My Music Editor

Started by Hardcoal, May 24, 2021, 23:57:24

Previous topic - Next topic

Hardcoal

Yea you have..
Thanks for the Zip...
I know i can play my piano using midi out and i did it.
but i wanted a stand alone software that plays a piano with out delay and sounds reasonable..
Ill also add samples from my synth..

but can I afterwards can I use it in Free/Commercial  App distribution?
Code

Midimaster

I suggested to use your E-Piano once for getting the Piano-Samples. Than include the bundle of OGGs into your app. Now it is stand-alone.

A recorded sample sound as perfect as the source was (+ the recording parameters). So if you recorded with 48kHz, 24bit and a harmless compression, you will get realistic piano sounds in your app. The price is the size of 10-100MB for the bundle of samples.

If you created the sounds in a "recording" way, you are the "creator". It is not longer the work of the E-Piano-factory. So you can use it as you like. No one can hinder you. Also in commercial apps. Be careful not to use the name of the E-Piano. You might get in conflict with trademarks, etc...

The forbitten way would be, accessing the ROMs of a E-Piano directly and copying the content to a own file. Or also forbidden copying files from other software developers with out the permission.
...back from Egypt

Hardcoal

Ok. i made progress..

now..

Is there a way to trick the computer to think an external midi keyboard is connected to it.
so i can play from my app on another app?
Code

Midimaster

yes, I remember that (in former times) there were "virtual midi-devices", that enabled to route the MIDI-OUT signal direct to MIDI-IN of another app.

Perhaps the app MIDI-OX can do this? This a swiss-knife for MIDI-Analyses and a must for each MIDI programmer. It looks a little bit "out-of-date" but it still works perfect for several MIDI-problems or Debugging. I use it since 20 years...

Homepage: http://www.midiox.com/

Download: http://www.midiox.com/zip/midioxse.exe


Did you already check again the list of MIDI-IN-DEVICES (in your BlitzMax-app) after you started the third-party- app? Perhaps, if you have luck, the app added its "device" and is now avaiable with a normal entry in the MIDI-IN-DEVICE-list...
...back from Egypt

Hardcoal

#139
Awesome ill check it and see TY.


im almost certain you answered that before. but im not sure, so ill ask again..
is their a way to reduce the latency of the built in midi instruments, or do i have to tolerate the latency as it it?
Code

Midimaster

The MIDI communication itself has <10msec latency, the problem on Windows is the audio-player behind it, which loads each sound again and again and send them with a "secure" latency to the audio-out. Windows-typical is 160msec. Or in notes: It is more than a 1/16-note in a 120bpm-Song.This is not acceptable for music purposes.

The only chance you have it to do this one time for only recording the resulting audio, then cut the piano samples and use them for future music. You need to establish your own MIDI-player. With BlitzMax and the FreeAudio-Ringbuffer you will be able to reduce the latency to moderate 40msec, with MINIAUDIO (on BlitzMax NG) you will get something below 25msec. This is the same as people playing 9-12 meters next to you. Or in notes: It is shorter than a 1/64-note in a 120bpm-Song. Acceptable.
...back from Egypt

Hardcoal

Hi..

Im trying to detect how to try opening another midi port when one does not get opened

midiIn.openPort(0)

lets say this does not open . it produce and error..
how can i detect it.. and than try to open another port like  midiIn.openPort(1)

thanks
Code

Hardcoal

hi  how can i time stretch a sample without changing the pitch.. so i can change drum bits to a desired RPM ..
anyway im experimenting on it using my logic.. see if it works..
Code

Midimaster

#143
If you really only want to slow down the speed of a drum track you could have luck with a simple solution.

The big difference between drum tracks and regular music is, that in drum tracks are (nearly) silent parts between the events.

The method would be to manipulate the TAudioSample:

Scan with a pointer through the source TAudioSample and search for silence. If you find "loudness" then copy alle the sample values as they are into the new target TAudioSample as long as they are "loud". If you find the part where true silence starts,  go ahead until you find again the moment when it changes to loudness. Now calculate from the old pointer the new pointer by multiplying it with your speed changing factor. Start writing the source samples to the new pointer position.


TAudioSamples have values from -32000 to + 32000. A value of ±1000 means -50dB, a value of ±125 means -80dB. You have to decide (define) where silence starts for you. This level is called "Threshold" (±125 is a good value).

As audio wave often cross the Zero-line a simple search for  low values would not lead to success. But if you find low values for a long time this can be a good indication for "silence". A long time can be 100msec (means 4800 sample step ahead) You have to define how long the sequence of low values needs to be to be classifiet as "silence"
maybe 2400 is also good or you . Just explore...

A sudden value above the threshold is immediately a indication for "loudnees". No need to verifiy it for a long time.

You can hear this in my example here:

https://www.syntaxbomb.com/worklogs/miniaudio-wrapper-for-blitzmax-enables-wasapi-playback-and-recording-mp3/msg347049834/#msg347049834




There is no need for my MiniAudio-Module or my FreeAudio-Ringbuffer. Without them you can do it  directly with TAudioSamples. but without the possibility of sudden real time speed changes.

If you want to change the speed immediately while it is running you should think about using MiniAudio-Module or my FreeAudio-Ringbuffer.






...back from Egypt

Hardcoal

I had a along break..

I came back to work on it..

this project is the mother project from which Im pulling stuff for smaller ones.
Code