|
From: | Иван Заярный |
Subject: | Re: [fluid-dev] fluid-dev Digest, Vol 126, Issue 3 |
Date: | Wed, 23 Oct 2013 00:50:01 +0400 |
Send fluid-dev mailing list submissions to
address@hidden
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.nongnu.org/mailman/listinfo/fluid-dev
or, via email, send a message with subject or body 'help' to
address@hidden
You can reach the person managing the list at
address@hidden
When replying, please edit your Subject line so it is more specific
than "Re: Contents of fluid-dev digest..."
Today's Topics:
1. Streaming midi rendering data (???? ???????)
2. Re: Streaming midi rendering data (Element Green)
3. Streaming midi rendering data to playback output. (???? ???????)
----------------------------------------------------------------------
Message: 1
Date: Mon, 21 Oct 2013 22:18:02 +0400
From: ???? ??????? <address@hidden>
To: address@hidden
Subject: [fluid-dev] Streaming midi rendering data
Message-ID:
<address@hidden>
Content-Type: text/plain; charset="windows-1252"
Hi everyone)
I faced with next problem. Midi file rendering works slowly. It can take
20-30 seconds for one minute midi file long.
So i've decided to design streaming generated sound data from midi to a
playback output.
Idea is simple :generated from midi file audio data goes to output, while
synth is generating other data.
I've tried to do it by using fluid_player. But i faced with another
problem: generated audio file sounds much faster than it should be.(than
original midi file)
I tried to set bpm(tempo) manually, it didn't help me. It looks like
fluid_player_set_bpm() method doesn't work at all.
Example of code used for generating audio data from midi file:
player = new_fluid_player(synth);
fluid_player_add(player, midiPath);
fluid_settings_setstr(settings, "audio.file.type", "raw");
fluid_settings_setnum(settings, "synth.sample-rate", 44100);
fluid_settings_setstr(settings, "audio.file.format", "s16");
fluid_settings_setstr(settings, "audio.file.endian", "little");
fluid_settings_setint(settings, "audio.period-size", 4096);
fluid_player_play(player);
fluid_player_set_bpm(player,65);// i get tempo from test midi file.
fluid_synth_write_s16(synth, buffersize / 2 , buffer2 ,0 , 2, buffer2, 1,
2);
I attached test data to email.
Could you give me an example of how to generate audio data from midi file
to memory in "streaming manner"?
What?s wrong with my code example ? Is it bug of fluid player or i am just
incorrectly using fluidSynth lib?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nongnu.org/archive/html/fluid-dev/attachments/20131021/56b91715/attachment.html>
------------------------------
Message: 2
Date: Mon, 21 Oct 2013 12:42:22 -0600
From: Element Green <address@hidden>
To: FluidSynth mailing list <address@hidden>
Subject: Re: [fluid-dev] Streaming midi rendering data
Message-ID:
<address@hidden>
Content-Type: text/plain; charset="utf-8"
Hello,
I would test the FluidSynth command line application to see how fast it
renders MIDI to a file. Use the --fast-render (-F) command line switch to
specify the file to write to.
For a source code example, the FluidSynth command line code is probably the
best resource. Search for "fast_render" in fluidsynth/src/fluidsynth.c to
see how this works.
Best regards,
Element Green
On Mon, Oct 21, 2013 at 12:18 PM, ???? ??????? <address@hidden> wrote:
> Hi everyone)
>
> I faced with next problem. Midi file rendering works slowly. It can take
> 20-30 seconds for one minute midi file long.
>
> So i've decided to design streaming generated sound data from midi to a
> playback output.
>
> Idea is simple :generated from midi file audio data goes to output, while
> synth is generating other data.
>
> I've tried to do it by using fluid_player. But i faced with another
> problem: generated audio file sounds much faster than it should be.(than
> original midi file)
>
> I tried to set bpm(tempo) manually, it didn't help me. It looks like
> fluid_player_set_bpm() method doesn't work at all.
>
> Example of code used for generating audio data from midi file:
>
>
> player = new_fluid_player(synth);
>
> fluid_player_add(player, midiPath);
>
> fluid_settings_setstr(settings, "audio.file.type", "raw");
>
> fluid_settings_setnum(settings, "synth.sample-rate", 44100);
>
> fluid_settings_setstr(settings, "audio.file.format", "s16");
>
> fluid_settings_setstr(settings, "audio.file.endian", "little");
>
> fluid_settings_setint(settings, "audio.period-size", 4096);
>
> fluid_player_play(player);
>
> fluid_player_set_bpm(player,65);// i get tempo from test midi file.
>
> fluid_synth_write_s16(synth, buffersize / 2 , buffer2 ,0 , 2, buffer2, 1,
> 2);
>
> I attached test data to email.
>
> Could you give me an example of how to generate audio data from midi file
> to memory in "streaming manner"?
>
> What?s wrong with my code example ? Is it bug of fluid player or i am just
> incorrectly using fluidSynth lib?
>
>
> _______________________________________________
> fluid-dev mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/fluid-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nongnu.org/archive/html/fluid-dev/attachments/20131021/0d316112/attachment.html>
------------------------------
Message: 3
Date: Tue, 22 Oct 2013 14:03:03 +0400
From: ???? ??????? <address@hidden>
To: address@hidden
Subject: [fluid-dev] Streaming midi rendering data to playback
output.
Message-ID:
<CAGA3L2Hkv_sfBkHLX7p8rB_o6XG=aFoG7==address@hidden>
Content-Type: text/plain; charset="windows-1252"
Hi everyone)
I faced with next problem. Midi file rendering works slowly. It can take
20-30 seconds for one minute midi file long.
So i've decided to design streaming generated sound data from midi to a
playback output.
Idea is simple :generated from midi file audio data goes to output, while
synth is generating other data.
I've tried to do it by using fluid_player. But i faced with another
problem: generated audio file sounds much faster than it should be.(than
original midi file)
I tried to set bpm(tempo) manually, it didn't help me. It looks like
fluid_player_set_bpm() method doesn't work at all.
Example of code used for generating audio data from midi file:
player = new_fluid_player(synth);
fluid_player_add(player, midiPath);
fluid_settings_setstr(settings, "audio.file.type", "raw");
fluid_settings_setnum(settings, "synth.sample-rate", 44100);
fluid_settings_setstr(settings, "audio.file.format", "s16");
fluid_settings_setstr(settings, "audio.file.endian", "little");
fluid_settings_setint(settings, "audio.period-size", 4096);
fluid_player_play(player);
fluid_player_set_bpm(player,65);// i get tempo from test midi file.
fluid_synth_write_s16(synth, buffersize / 2 , buffer2 ,0 , 2, buffer2, 1,
2);
Links to test data
Midi file:https://www.dropbox.com/s/agt158q7umvcuxv/testMelody.mid
Generated wave:
https://www.dropbox.com/s/rt8p39zzsgbs8j7/generatedMelody.wav
Could you give me an example of how to generate audio data from midi file
to memory in "streaming manner"?
What?s wrong with my code example ? Is it bug of fluid player or i am just
incorrectly using fluidSynth lib?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nongnu.org/archive/html/fluid-dev/attachments/20131022/39c08db5/attachment.html>
------------------------------
_______________________________________________
fluid-dev mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/fluid-dev
End of fluid-dev Digest, Vol 126, Issue 3
*****************************************
[Prev in Thread] | Current Thread | [Next in Thread] |