VOGONS


Reply 2080 of 2175, by Spesek

User metadata
Rank Newbie
Rank
Newbie
Falcosoft wrote on 2024-12-26, 18:12:

2. Direct rendering by Bassmidi is only possible if you send the Midi file directly to Bassmidi, meaning such direct rendering would bypass the whole parser/engine of Midi Player. Custom controller/SysEx settings and other overrides would not apply meaning it could sound completely differently compared to real-time playback by Midi Player.
Such direct rendering function is available e.g. in Coolsoft's VMS if you need it anyway:

I think I can think of a solution:
While I'm no BASS user, I'm guessing that it has some sort of method to render audio not to speakers, but to memory or file.
What FSMP can do is:
- Execute first MIDI event
- Calculate time in audio samples to the next event
- Tell BASS to render the said amount of samples to the output wav file (or memory). And wait for it to render, not wait for the time to pass. That's the main difference
- Execute the next MIDI event
- Repeat step 2 until end marker is reached.
And Voila! MIDI file rendered offline with channel overrides! 😁

BTW, recording should not lag unless the playback is also lagging. And when the playback is lagging it means there are some more serious problems that should be fixed anyway. Maybe the lagging is related to using FSMP in Wine?

That's the problem with real-time playback. It can sometimes lag... just because. Either Wine or Windows can have a stroke sometimes and you have to rerecord a 7 minute song... again.

Reply 2081 of 2175, by Falcosoft

User metadata
Rank l33t
Rank
l33t
Spesek wrote on 2024-12-26, 18:29:
... I think I can think of a solution: While I'm no BASS user, I'm guessing that it has some sort of method to render audio not […]
Show full quote

...
I think I can think of a solution:
While I'm no BASS user, I'm guessing that it has some sort of method to render audio not to speakers, but to memory or file.
What FSMP can do is:
- Execute first MIDI event
- Calculate time in audio samples to the next event
- Tell BASS to render the said amount of samples to the output wav file (or memory). And wait for it to render, not wait for the time to pass. That's the main difference
- Execute the next MIDI event
- Repeat step 2 until end marker is reached.
And Voila! MIDI file rendered offline with channel overrides! 😁.

I do not think this can work since this way Bassmidi would know nothing about the internal timings of the Midi and without this info if FSMP sent messages faster than real time the calculated reverb/effect etc. timing would be seriously off.

Website, Facebook, Youtube
Falcosoft Soundfont Midi Player + Munt VSTi + BassMidi VSTi
VST Midi Driver Midi Mapper

Reply 2082 of 2175, by Spesek

User metadata
Rank Newbie
Rank
Newbie
Falcosoft wrote on 2024-12-26, 18:42:

I do not think this can work since this way Bassmidi would know nothing about the internal timings of the Midi and without this info if FSMP sent messages faster than real time the calculated reverb/effect etc. timing would be seriously off.

I think you misunderstood me. The idea is for the FSMP to wait for the BASS to render the fraction of the time between note-ons.

Consider a simple example:
00:00 -> program change ch1 to 0; note on ch1 60 127
00:01 -> note off ch1 60; program change ch1 to 80; note on ch1 64 127
00:02 -> note off ch1 64
00:03 -> end marker

Assuming sample rate of 44100Hz
What FSMP would do be:

1. Tell bass:
- program change ch1 to 0
- note on ch1 60 127
- render exactly 44100 audio frames to memory (since exactly one second passes until the next event)
- note off ch1 60
- program change ch1 to 80
- note on ch1 64 127
- render exactly 44100 audio frames to memory (since exactly one second passes until the next event)
- note off ch1 64
- render exactly 44100 audio frames to memory (since exactly one second passes until the next event)
2. Combine the rendered data:
- concatenate the three short* arrays into one of exactly 132300 numbers long
- write the output as a wave file!

Reply 2083 of 2175, by Spesek

User metadata
Rank Newbie
Rank
Newbie

Here's a C-ish implementation of what I'm thinking here.
FSMP probably isn't programmed like that, but I hope that this gets the idea across.

long int samples = (int)(FSMP_MIDI_OBJECT->duration * sampleRate);

short *samplesLeft = malloc(sizeof(short) * samples);
short *samplesRight = malloc(sizeof(short) * samples);

long int elapsedSamples = 0;

FSMP_BEGIN_PLAYBACK();
while(elapsedSamples < samples)
{
int timeToNextEvent = (FSMP_GET_CURRENT_EVENT()->time * sampleRate) - elapsedSamples;
if(timeToNextEvent == 0)
{
FSMP_EXECUTE_EVENT(FSMP_GET_CURRENT_EVENT(), BASS_RENDERER);
FSMP_ADVANCE_TO_NEXT_EVENT();
continue;
}
short *tempLeftSamples = malloc(sizeof(short) * timeToNextEvent);
short *tempRightSamples = malloc(sizeof(short) * timeToNextEvent);

FSMP_EXECUTE_EVENT(FSMP_GET_CURRENT_EVENT(), BASS_RENDERER);
FSMP_ADVANCE_TO_NEXT_EVENT();

BASS_RENDERER->RENDER_SHORT(tempLeftSamples, tempRightSamples);

// add the data to main audio buffer
for(int i = 0; i < timeToNextEvent; i++)
{
samplesLeft[elapsedSamples + i] += tempLeftSamples[i];
samplesRight[elapsedSamples + i] += tempRightSamples[i];
}

elapsedSamples += timeToNextEvent;
}

}[/code]

Reply 2084 of 2175, by Roland User

User metadata
Rank Member
Rank
Member

This utility converter whitch I want see in win32 mode )

Reply 2085 of 2175, by Falcosoft

User metadata
Rank l33t
Rank
l33t
Roland User wrote on 2024-12-26, 22:51:

This utility converter whitch I want see in win32 mode )

Hi,
Here is a new test version
https://falcosoft.hu/midiplayer_65_test.zip
First copy your GM-MT and MT-GM directories to Midi Player's Instrument directory (you can delete the exe files, only the PATCHCNV.TXT files are relevant).
Then you should open Event Viewer/Debugger and select Actions menu -> Convert Patches and then select one of your PATCHCNV.TXT files.
Finally you can audit/listen to your modified Midi and if you are satisfied you can use File-> Save File As.

Website, Facebook, Youtube
Falcosoft Soundfont Midi Player + Munt VSTi + BassMidi VSTi
VST Midi Driver Midi Mapper

Reply 2086 of 2175, by Roland User

User metadata
Rank Member
Rank
Member

Thank you!
Very very good )

Reply 2087 of 2175, by Falcosoft

User metadata
Rank l33t
Rank
l33t
Spesek wrote on 2024-12-26, 18:57:
Falcosoft wrote on 2024-12-26, 18:42:

I do not think this can work since this way Bassmidi would know nothing about the internal timings of the Midi and without this info if FSMP sent messages faster than real time the calculated reverb/effect etc. timing would be seriously off.

I think you misunderstood me. The idea is for the FSMP to wait for the BASS to render the fraction of the time between note-ons.
...

Thanks, but I think that (at least partly) you also misunderstood me 😀.
I got your idea about event to event rendering. My problem is the timings/states that are not represented in the Midi data itself (not even in the memory image). I mean the state can be influenced by sending real time SysEx/Controller/NRPN messages that are sent real time but not represented in the memory image of the Midi file.
In BassMidi you cannot change a non-decoding stream to a decoding stream run-time. So for non-real time direct rendering I have to create another BassMidi stream as decoding (BASS_STREAM_DECODE).
https://www.un4seen.com/doc/#bassmidi/BASS_MI … reamCreate.html
But this stream will not inherit the full state of the previous one. I have to find a way to transfer the full state to this new stream.

Website, Facebook, Youtube
Falcosoft Soundfont Midi Player + Munt VSTi + BassMidi VSTi
VST Midi Driver Midi Mapper

Reply 2088 of 2175, by Roland User

User metadata
Rank Member
Rank
Member

Hi Zoltan )
You can add support Creative CMF and AdLib MUS and Voyetra Digital Orchestarator ORC formats ? )
As here https://github.com/stascorp/MIDIPLEX )
And if possible , so all other formats )

Reply 2089 of 2175, by Falcosoft

User metadata
Rank l33t
Rank
l33t
Roland User wrote on 2024-12-28, 00:57:
Hi Zoltan ) You can add support Creative CMF and AdLib MUS and Voyetra Digital Orchestarator ORC formats ? ) As here https://git […]
Show full quote

Hi Zoltan )
You can add support Creative CMF and AdLib MUS and Voyetra Digital Orchestarator ORC formats ? )
As here https://github.com/stascorp/MIDIPLEX )
And if possible , so all other formats )

Hi,
These formats are targeted specially for FM chips (opl2 etc.) and cannot sound good without the corresponding FM hardware and FM banks. I do not think it makes sense to include them in a standard Midi player that does not know anything about how to program the targeted FM hardware.

Website, Facebook, Youtube
Falcosoft Soundfont Midi Player + Munt VSTi + BassMidi VSTi
VST Midi Driver Midi Mapper

Reply 2090 of 2175, by Roland User

User metadata
Rank Member
Rank
Member

Yes , but I all still thinks , what there is a meaning add this formats , at least as feature for convertion from rare formats to MIDI ) even if rude method )

Reply 2091 of 2175, by Falcosoft

User metadata
Rank l33t
Rank
l33t
Roland User wrote on 2024-12-28, 02:30:

Yes , but I all still thinks , what there is a meaning add this formats , at least as feature for convertion from rare formats to MIDI ) even if rude method )

You can use MIDIPLEX for conversion (but I strongly think that converting such files to standard Midi files is useless) or better you can use ADPlug/ADPlay to play such files properly.

Website, Facebook, Youtube
Falcosoft Soundfont Midi Player + Munt VSTi + BassMidi VSTi
VST Midi Driver Midi Mapper

Reply 2092 of 2175, by Roland User

User metadata
Rank Member
Rank
Member

Maybe )
Simply , I inclined to all in one player and sequancer ) in ideal , I want see in your FSMP , player converter rare formats , MIDI player , and a little sequancer )

Reply 2093 of 2175, by Roland User

User metadata
Rank Member
Rank
Member

A little more re voice MIDI for SCVA / SC-8820 Map
F-29 Retaliator theme 2
Stunts main theme
Stunts theme 2 in select car and tracks
In v2 includde F-29 Retaliator themes for Roland SCVA/SC-8820 Map

Reply 2094 of 2175, by Roland User

User metadata
Rank Member
Rank
Member

Hi Zoltan )
https://archive.org/details/mame-versioned-ro … m-32l-rom-files
Here have ROMs for MT-32 and CM32 synths )
I use classic CM32 ROM and classic CM32 PCM ) but I can not undrstand why size diffirence , for example
MT32_CONTROL.ROM = 65 536 bytes
mt32_ctrl_1_04.rom = 65 536 bytes
mt32_ctrl_1_05.rom = 65 536 bytes
mt32_ctrl_1_06.rom = 65 536 bytes
mt32_ctrl_1_07.rom = 65 536 bytes
mt32_ctrl_bluer.rom = 65 536 bytes
mt32_ctrl_2_04.rom = 131 072 bytes
mt32_ctrl_2_06.rom = 131 072 bytes
mt32_ctrl_2_07.rom = 131 072 bytes
why so ? What is the difference?
cm32l_ctrl_1_00.rom = 65 536 bytes
cm32l_ctrl_1_02.rom = 65 536 bytes
Why this smaller if sounds in bank of CM series more ?

Reply 2095 of 2175, by Falcosoft

User metadata
Rank l33t
Rank
l33t
Roland User wrote on 2024-12-29, 23:14:
Hi Zoltan ) https://archive.org/details/mame-versioned-ro … m-32l-rom-files Here have ROMs for MT-32 and CM32 synths ) I use cla […]
Show full quote

Hi Zoltan )
https://archive.org/details/mame-versioned-ro … m-32l-rom-files
Here have ROMs for MT-32 and CM32 synths )
I use classic CM32 ROM and classic CM32 PCM ) but I can not undrstand why size diffirence , for example
MT32_CONTROL.ROM = 65 536 bytes
mt32_ctrl_1_04.rom = 65 536 bytes
mt32_ctrl_1_05.rom = 65 536 bytes
mt32_ctrl_1_06.rom = 65 536 bytes
mt32_ctrl_1_07.rom = 65 536 bytes
mt32_ctrl_bluer.rom = 65 536 bytes
mt32_ctrl_2_04.rom = 131 072 bytes
mt32_ctrl_2_06.rom = 131 072 bytes
mt32_ctrl_2_07.rom = 131 072 bytes
why so ? What is the difference?
cm32l_ctrl_1_00.rom = 65 536 bytes
cm32l_ctrl_1_02.rom = 65 536 bytes
Why this smaller if sounds in bank of CM series more ?

I do not know but one thing is sure: the control ROM size has nothing to do with the number of supported sounds. The PCM ROMs define the supported sounds not the control ROMs.

Website, Facebook, Youtube
Falcosoft Soundfont Midi Player + Munt VSTi + BassMidi VSTi
VST Midi Driver Midi Mapper

Reply 2096 of 2175, by Roland User

User metadata
Rank Member
Rank
Member

But if mix PCM from CM series and control from MT series , sounds not playable )
So some kind of relationship is have)
I thought earlier if size bigger , accuracy playing higher )

Reply 2097 of 2175, by Falcosoft

User metadata
Rank l33t
Rank
l33t
Roland User wrote on 2024-12-30, 12:01:

But if mix PCM from CM series and control from MT series , sounds not playable )
So some kind of relationship is have)
I thought earlier if size bigger , accuracy playing higher )

No, there are no size based relations.
MT-32 PCM ROM works only with MT-32 Control ROMs and CM series PCM ROM works only with CM series Control ROMs.
But both 64K and 128K MT-32 Control ROMs work with the same 512K MT-32 PCM ROM.

Website, Facebook, Youtube
Falcosoft Soundfont Midi Player + Munt VSTi + BassMidi VSTi
VST Midi Driver Midi Mapper

Reply 2098 of 2175, by Roland User

User metadata
Rank Member
Rank
Member

Thank you ) now I understand )

Reply 2099 of 2175, by Roland User

User metadata
Rank Member
Rank
Member

Hi Zoltan )
Happy new year )
If possible , add function fast export MIDI file to Wave file ) I mean without play in realtime ) as this do in Foobar2000 ) because Foobar 2000 bad work with MUNT plugin , but normal export from any other formats and synths where not need set roms)