Recent

Author Topic: I have a list from songs!  (Read 23003 times)

Neprofi

  • Full Member
  • ***
  • Posts: 174
Re: I have a list from songs!
« Reply #30 on: June 05, 2015, 02:21:07 pm »
Загрузи фото что получилось у Тебя????

typo

  • Hero Member
  • *****
  • Posts: 3051
Re: I have a list from songs!
« Reply #31 on: June 05, 2015, 02:53:10 pm »
Of course, as said skalogryz, you need a connection of nexus between the label of this music in the ListBox and the audio file.

From where will come these labels? You say that you have a text file, but how it was written? And the audio files? You should somehow get the labels to the ListBox from the audio files info and not from a separated text file which has nothing to do with the audio files.

And what the logical connection between formatted text in the ListBox and the contents of the labels? Do you wish to colorize text randomly? I don't think so. What the logical connection among all these things?
« Last Edit: June 05, 2015, 03:05:36 pm by typo »

Neprofi

  • Full Member
  • ***
  • Posts: 174
Re: I have a list from songs!
« Reply #32 on: June 05, 2015, 05:49:42 pm »
у меня не получилось помогите мне опишите подробно((

typo

  • Hero Member
  • *****
  • Posts: 3051
Re: I have a list from songs!
« Reply #33 on: June 05, 2015, 06:39:00 pm »
What the purpose of your project? Is it a homework task?

Neprofi

  • Full Member
  • ***
  • Posts: 174
Re: I have a list from songs!
« Reply #34 on: June 05, 2015, 08:05:23 pm »
моя цель воспроизвести звук, и вывести перевод что он обозначает! если можете то помогите спасибо)))

typo

  • Hero Member
  • *****
  • Posts: 3051
Re: I have a list from songs!
« Reply #35 on: June 05, 2015, 08:33:12 pm »
Are  the translations in different text files? Could you name the audio files as you wish or they will come from the web, for instance?

If you can name the audio files as you want, then you could name them with the music title. So you could generate a label for the ListBox from the filenames. You could have a part of the filename made by numbers, but could also have a fixed part with the music title.

Code: [Select]
1234567890MusicTitle.mp3

In this case, music title could be the link among the different info data.

Alternatively, you could create an alphanumeric ID for them.
« Last Edit: June 05, 2015, 08:48:38 pm by typo »

Neprofi

  • Full Member
  • ***
  • Posts: 174
Re: I have a list from songs!
« Reply #36 on: June 05, 2015, 08:50:20 pm »
английские слова звучат короткие короче! пример такой: звучит звук на английском языке (hi) и мне надо вывести таким образом что бы перевод соответствовал звуку! вот пример:

привет
[hyi]
hi

вот такое выводилось в ListBox таки образом

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: I have a list from songs!
« Reply #37 on: June 05, 2015, 08:53:41 pm »
Попробуем обратный подход.

Эту задачу на паскале сделать невозможно! Её нужно решать в C#.
« Last Edit: June 05, 2015, 08:56:30 pm by skalogryz »

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: I have a list from songs!
« Reply #38 on: June 05, 2015, 09:17:48 pm »
Ты лучше расскажи как ты получаешь список аудио файлов.


Neprofi

  • Full Member
  • ***
  • Posts: 174
Re: I have a list from songs!
« Reply #39 on: June 05, 2015, 09:55:34 pm »
Список из Звуков получу так
procedure TForm2.FormCreate(Sender: TObject);
begin

  if not BASS_Init(-1, 44100, 0, Handle, nil) then//создаю поток
  raise exception.Create('Error initializing audio!');
  FRepeatCount := udRepeatCount.Position;

Flist:=TStringLIST.Create;   //Объявляем лист
FList.Add('sound\about.mp3');// можно добавить любуй звук типа строка в СПИСОК List
FList.Add('sound\across.mp3');
FList.Add('sound\after.mp3');
FList.Add('sound\again.mp3');
ListToListbox();
end;   

 а еще надо как то перевод умудрится с транскрипцией вставить! и желательно перевод разным цветом)))

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: I have a list from songs!
« Reply #40 on: June 05, 2015, 10:13:54 pm »
какой ужас! ты его заполняешь руками!
(если список файлов заполнять руками, то и список переводов нужно делать тоже вручную!)

тебе срочно нужно переписать, хотя бы на использование TIniFile.
Где .ini файл может выглядеть так:
Code: [Select]
[about]
file=sound\about.mp3
eng=about
rus=о/об
trans=[əˈbɐʊt]

[across]
file=sound\across.mp3
eng=across
rus=через
trans=[əˈkɹɒs]

Список всех возможных слов сможешь получить через
Code: [Select]
  ini.ReadSections

Имя файла для проигрывания сможешь получить через
Code: [Select]
  fn := ini.ReadString( curword, 'file','')

ну а английский вариант с переводом и транскрипцией так:

Code: [Select]
  ListBox1.Items.Add ( ini.ReadString( curword, 'eng','') );
  ListBox1.Items.Add ( ini.ReadString( curword, 'trans','') );
  ListBox1.Items.Add ( ini.ReadString( curword, 'rus','') );

Neprofi

  • Full Member
  • ***
  • Posts: 174
Re: I have a list from songs!
« Reply #41 on: June 05, 2015, 10:17:15 pm »
Извините да у меня ini файл) забыл просто! этот код кинуть куда??? на formcreate?

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: I have a list from songs!
« Reply #42 on: June 05, 2015, 10:20:08 pm »
Извините да у меня ini файл) забыл просто! этот код кинуть куда??? на formcreate?
...да... на FormCreate...

Neprofi

  • Full Member
  • ***
  • Posts: 174
Re: I have a list from songs!
« Reply #43 on: June 05, 2015, 10:21:25 pm »
если вам не сложно можете создать маленький проект я посмотрю пример кода( а то так я не сильно пойму )) я буду по вашему коду подправлять! спасибо жду)

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: I have a list from songs!
« Reply #44 on: June 05, 2015, 10:28:46 pm »
а то так я не сильно пойму
и в каком именно месте ты не понимаешь?

 

TinyPortal © 2005-2018