Home made software FreqGen using midi to generate frequencies for medical purposes

Ruptor

New member
I have written a 16 channel frequency generator that uses the PC midi Synth as the output device but I don't have a clue about midi and its capabilities hence I have more than a few problems that need expert midi help. I have read a bit about midi messages and used the windows API to get things to work but for starters I am confused with the note identification system, channels and controllers. The first question is can I have two of the same notes on one instrument? It seems from what I have read that the note is identified by its note number but an unbent note is a different note to a bent one even though they have the same note number. I need the ability to have the same note with different degrees of bend on it to be output at the same time so how do I do it?
This is only the first of many stupid questions I am afraid.:o
 
Not 100% sure of what you are trying to do. But it sounds to me, you would send the two notes on different channels. Say channel 1 and two, because, with different bend information, they really are not the same note (or MIDI values), but MIDI would send it as a note with a bend, and I do think because of the 8 bit limitation, would drop the note not needed.

The way around that would be to send the channel information and the note, giving you up to 16 variations of the same note. (Which in MIDI case, would be 16 different sound modules or MIDI hardware).
 
midi data is sent in sequence,when you hear a chord the notes never start at the same time ... if you send the same note again on the same midi channel the first note would cut off


maybe you could use the pitch wheel controller #1 and use notes using different midi channels tuned to get what you want i.e:-

midi channel 1 - play note 42 pitched up to 42 and a few cents
midi channel 2 - play note 42 standard
midi channel 3 - play note 42 tuned to 42 and a few more cents
midi channel " - "" "" 42 e.t.c (up to 16 channels)

pitch control range (editable) is controlled within the software itself (i have no idea how you would implement it in yours) if you set it to 12 (an octave) that would give you control over 24 notes with all pitches in between (have no idea of the increments)

continuous controller chart

MIDI CC List



you could get the same effect using a DAW (like cubase,reaper,studio one e.t.c) and using say a piano VSTi



this forum i know has active audio software developers KVR Audio Forum


as a fall back this forum also has active developers (these guys are more amp sim orientated) GuitarAmpModeling.com ? Index page


if you post your question there maybe they could point you in the right direction


hope you get what your looking for :)


just out of interest (and cos im really nosey) whats your medical software for ?
 
Hi Guys
Thanks for the response. Yes the 16 channel idea is what I need so that the same note with different pitch bends applied do not interfere with each other. I have the software set up for 16 channels but what messages do I send to the PC GS midi synth so it knows that the note I am sending is on a different channel or is it a case of having a different piece of hardware for each channel? See I told you I don't know anything about midi and I am confused about banks, channels, programs and voices etc. Since I read that the GS midi synth on a standard PC has 32 voices the plan was to assign one of my software channels to each frequency correlating to sixteen notes with different pitch bends. I will post my software so you can see what the idea is if I can figure out how to do it on this site.
 
This site won't take the file that is a 4 MByte zip file and I can't see what the limits or file types allowed are so that's a bust.
You can download it from post #36 here
The Rife Forum
but I can't remember if registration is required.
The software uses sound to kill pathogens in the body instead of antibiotics. What you don't think it can I hear you thinking well it has been known for almost 100 years (or longer by Buddist monks OHMMMMMM) that vibration can kill bacteria, viruses and parasites it is just that the drug companies don't give funding for reseach that will put them out of business and they fund all medical reseach.
 
Last edited:
Don't confuse the data with frequency. That information is not there in the data, MIDI is just a data exchange standard. I don't know the hexadecimal equivalent, but it simply states, when this information is sent, it is equal to say C3, the instrument make in turns decides how they will use that information. The end user (hardware engineer) of the data determines how the data will interact with the hardware. Think of it as a data handshake. HTML is an example of a standard, it just uses tags, think of MIDI data as tags.

The channels are simply for having up to 16 different pieces of hardware set on a channel so when it knows, that is intended for it and reacts. Each machine gets all the data, if a machine is set to receive only channel 1 data, then it ignores everything except channel 1 data. The channel really acts as a filter all channel 1 data act on, reject all other data.

It is really not that complex from a data perspective.
 
didn't see DM60`s reply .. musta took me ages to write mine !


"The NOTE ON message is structured as follows:

  • Status byte : 1001 CCCC
  • Data byte 1 : 0PPP PPPP
  • Data byte 2 : 0VVV VVVV
where:
"CCCC" is the MIDI channel (from 0 to 15)
"PPP PPPP" is the pitch value (from 0 to 127)
"VVV VVVV" is the velocity value (from 0 to 127)
"

taken from here MIDI tutorial for programmers

the windows midi synth will recognize 16 midi channels :)



channels are 1 to 16

voices are the sounds played (the instruments)

polyphony is how many notes in total a synth can play

banks are a collection of presets called up by program changes (and bank select messages)

---------- Update ----------

didn't see DM60`s reply again !



right at the bottom of that linked page ^ he gives contact information

"If you have any question, feel free to contact me at :"
 
It sounds like an interesting project.

It also sounds like an unnecessary project, because audio oscillators are not rare.

There are VST plug-ins that will happily produce an audio sweep using the PC GM midi synth.
 
Yeah, as said you have several different midi channels at your disposal.

If I understand correctly, though, it doesn't matter which 'note' you use as trigger or input...It's the output that matters, right?
So why not just use arbitrary input notes to trigger whatever you want?

Unless, of course, you need the entire range of notes to be available with various degrees of bend.

Can you tell us in detail how many notes and modifications of notes you need and, if helpful, what for?
Thanks.
 
Thanks Guys the penny is starting to drop by linking what you are saying but when I think I understand how I should arrange my software a spanner appears in the works.
DM60 said "The channels are simply for having up to 16 different pieces of hardware set on a channel" then Cwaked (name too complicated to type:) could be read as quacked:laughings:) said "the windows midi synth will recognize 16 midi channels". The PC is a single piece of hardware or is that there are in effect 16 sound generators within the GS Synth? Anyway I rigged my software to have 16 frequencies to correspond to the 16 channels but for some reason I became confused and didn't actually set the channel number in the message so I am running off to do that now, well when I finish typing.
The reason for doing the software is to give people the ability to set up to 16 frequencies in Hz that are played out the speakers of a computer. Everybody has a computer and I can give the software out for free so everybody can cure themselves of pathogen infections without the need to buy any expensive hardware. You can try it for yourself using your existing music hardware but it doesn't let you input a frequency you have to convert the notes to frequencies but 440 Hz lies on A4 the one above middle C and the A an octave above that is 880 Hz frequency known to hit many pathogens. Just sit with 880 Hz running a sine wave, that is instrument 152 on GS Synth, for 15 minutes and see the effect you will be amazed. You can improve the effect by pulsing the key that we refer to as gating in the Rife community and my software incorporates a gate frequency for each channel.
PS: any of the harmonic frequencies of 880 Hz like 440 Hz and 220 Hz that are octaves below or above should work but 880 Hz is the one listed in the Frequency list for known healing frequencies.
 
Last edited:
Ok, I'm glad you elaborated.

Basically, you want an app that lets the user choose from, and listen to, a predetermined set of frequencies of sine wave?

First of all, that probably exists already...but...:p

You could totally make this in Max/MSP very quickly and bundle it into a self contained application, without the need for midi at all.
The end user would require Max/MSP runtime to open it, but that's free.

If you go that road you could just use sine wave generators and mute switches to let the user switch tones on and off, all in a nice neat GUI.
The user could listen to any frequency, or any combination of frequencies.
You could also incorporate a reset and a variable speed control knob per oscillator for that pulsing effect.

If you're interested in that, PM me. If no expert but I know max well enough for this job.
 
Hold it! while looking at using the channel number in the message as you described I noticed the pitch is only +-127. I was under the impression that the pitch had a range of +-8192 as per this site
MIDI Pitch Bend
:confused: again which one is right or is it the case that the pitch value in the note command is rough and multiplied up by 64 to fill the actual range? See nothing is simple and with Midi it seems there are many ways to skin a cat.
 
Last edited:
Hold it! while looking at using the channel number in the message as you described I noticed the pitch is only +-127. I was under the impression that the pitch had a range of +-8192 as per this site
MIDI Pitch Bend
:confused: again which one is right or is it the case that the pitch value in the note command is rough and multiplied up by 64 to fill the actual range? See nothing is simple and with Midi it seems there are many ways to skin a cat.

I'd seriously forget midi..Max is made for this kind of thing.


I don't know a lot about it but it looks like midi pitch bend information uses twice as much 'bandwidith*' as normal note information, for a greater resolution.
*Is that the right word?

Midi input is limited to 128 values per channel. It's not +/-...it's just 0-127.
Pitch bend total resolution = 128 x 128.... 16384.
 
Ok, I'm glad you elaborated.

Basically, you want an app that lets the user choose from, and listen to, a predetermined set of frequencies of sine wave?

First of all, that probably exists already...but...:p

You could totally make this in Max/MSP very quickly and bundle it into a self contained application, without the need for midi at all.
The end user would require Max/MSP runtime to open it, but that's free.

If you go that road you could just use sine wave generators and mute switches to let the user switch tones on and off, all in a nice neat GUI.
The user could listen to any frequency, or any combination of frequencies.
You could also incorporate a reset and a variable speed control knob per oscillator for that pulsing effect.

If you're interested in that, PM me. If no expert but I know max well enough for this job.

I forgot all about Max, but yes a very good tool for this sort of thing.

I've had it for years when it came with Ableton. I have not really delved into it as much as I would like, but with a little time pretty sure you would create something faster.
 
I forgot all about Max, but yes a very good tool for this sort of thing.

I've had it for years when it came with Ableton. I have not really delved into it as much as I would like, but with a little time pretty sure you would create something faster.

It gives me shivers. Such an incredibly cool, and accessible, suite.
Heh...I made a program at uni to calculate the final result of the degree course, since we had our percentages per module but each module had a different weighting.

Given that the course was where I learned to use Max, I got a bit of a kick out of that. :p
 
Yes I am getting pitch bend muddled up with note number that is described as pitch in the note message. Another penny just dropped when you say note 127 is the top note it corresponds to a frequency of 12543 Hz and the highest frequency I can get out of my software is about 13280 Hz that is probably note 127 with maximum pitch bend up. A PC can generate frequencies slightly above 20 KHz and that is what I was hoping to do with the Midi output so how do I get notes above #127. I read about companies that use Midi in the ultrasonic range to control those sound wall devices that block sound around a dance floor so the tables are sound free so what Midi message format are they using? There is no limit for the note number other than the 8 bit limit in the standard message but I guess I would need a Synth that was able to interpret a longer note number message.
What is Max?

Several posts popped up while I was typing :confused:
Is Max free?
I have already written my program and it is working just not 100% and that is why I am here asking stupid questions. If you PM your email I can send it so you know what I am talking about.
 
Last edited:
Yes I am getting pitch bend muddled up with note number that is described as pitch in the note message. Another penny just dropped when you say note 127 is the top note it corresponds to a frequency of 12543 Hz and the highest frequency I can get out of my software is about 13280 Hz that is probably note 127 with maximum pitch bend up. A PC can generate frequencies slightly above 20 KHz and that is what I was hoping to do with the Midi output so how do I get notes above #127. I read about companies that use Midi in the ultrasonic range to control those sound wall devices that block sound around a dance floor so the tables are sound free so what Midi message format are they using? There is no limit for the note number other than the 8 bit limit in the standard message but I guess I would need a Synth that was able to interpret a longer note number message.
What is Max?

Several posts popped up while I was typing :confused:
Is Max free?
I have already written my program and it is working just not 100% and that is why I am here asking stupid questions. If you PM your email I can send it so you know what I am talking about.

There's still a bit of a mixup going on here, I think.
Midi data isn't inextricably linked to frequency or pitch.
Sure, in a particular synth or VI there'll be a preset correlation, but midi data is simply a trigger. You can use it to trigger any number of events.
Patch change, sample start, note on/off...whatever

Max isn't free, but there's a 30 day demo and any apps you make will continue to work just fine, as long as the user installs max run-time. The latter is free.

If you think you're close and it's just a case of ironing out the flaws then fair play man, but if you're not, i'd consider ditching the midi idea.
Purely because max would be simpler, and it'll give you a bucketload more options.


"what is max"
It's an object-based programming environment.
Put simply, you could arrange a load of sine wave generators all at preset frequencies (type in the number). They're all on, always, but you'd use switches to make them audible.
The user would see the switches and some labels....

Or, you could have a notched rotary knob that flicks between a range of preset frequencies. That means only one can be on at a time though.
The options are almost literally endless.

It's sooooo simple for stuff like this.

Damn, I used it to write full control software for Protools, with the intention of making hardware to go with it.
I haven't checked this video through, but it looks like it'll show some basics.
 
DM60 said "The channels are simply for having up to 16 different pieces of hardware set on a channel" then Cwaked (name too complicated to type:) could be read as quacked:laughings:) said "the windows midi synth will recognize 16 midi channels".

same thing just described differently,the channels are independent of each other,any channel can go to any internal/external/synth/drum machine e.t.c :)



your in good hands with steenamaroo (and you think cakewalkKaKed is an odd name ?) i think he`s right,would be far easier to have the app as a standalone :)






quacked :laughings: git :P
 
Now sorted out the notes and channels but have another stupid question. The 128 standard instruments are ok but now the extended instruments are not available. It's all a bit muddled up and before the mods the extra instruments were working by addressing a different controller but it may have been a fluke. Is it the case that the standard instruments are on controller 0 and extended on controller 1 or do I have that wrong too. I am asking before doing the code to switch controllers.
 
Back
Top