guitarix go's midi

Programming applications for making music on Linux.

Moderators: MattKingUSA, khz

brummer

guitarix go's midi

Post by brummer »

Hi

guitarix is a simple linux guitar amplifier with some buildin effects.

after I have include a tuner, based on a pitch tracker, I have include a beatdetector to guitarix. Based on this two units I have build a pitch/beat to midi converter with a output port to jack_midi.
The midi port is persistent, the midi output could be enable/disable over the menu. There are controlls for velocity, channel chooser, program chooser, oktave switch and sensity. With the oktave swich you can change the output oktave (2 up or down), that is helpfull, if you drive for example hydrogen with the output or when you will drive a bass with it.
With the sensity slider you can steer the accuracy from the midi output, if you set it high, the outputs notes will be more correct then if you set it low. So low will be nice for drums, it comes fast and accurat to the beat, high comes a little slower but accurat to the note (bass, trumpet, . . )
This units are include in the guitarix-svn version first, you can browse(grep) the source here:
http://guitarix.svn.sourceforge.net/viewvc/guitarix/

This new units break the old preset handling, so when you run this version, it will remove all your old guitarix-presets (if you run guitarix befor).

have fun
brummer

ps. guitarix look out for a translator (germann > english) to translate some documents
thorgal
Established Member
Posts: 739
Joined: Mon Apr 07, 2008 6:04 pm

Re: guitarix go's midi

Post by thorgal »

hey brummer, nice to hear MIDI makes its way into guitarix :)

but do you imply that people should then use the jack MIDI handling ? most of the time, jack is started without the -X (seq or raw) option. SO MIDI is treated by the ALSA layer. But guitarix opens a jack MIDI port. What if jack is not started with its MIDI handling ?
brummer

Re: guitarix go's midi

Post by brummer »

yes, guitarix is a application for jack. 8)
If you dont wont or can use the internal alsa2jack bridge, you can use external tools like a2jmid
http://home.gna.org/a2jmidid/
brummer

Re: guitarix go's midi

Post by brummer »

svn update again.

Now you can use up to 3 midi channels with different settings (channel, program, velocity, sensity) for every channel and you can set the values for the beat detector.

guitarix akt now as a LIVE BAND IN THE BOX. :mrgreen:
thorgal wrote:But guitarix opens a jack MIDI port
Yea, guitarix send the midi signal direct from the audio tread, BEFOR the audio signal has pass the compute process. I dont now if that was posible with a alsa midi client (I dont think so).
Every detection for pitch or beat need's time, and you can detect it only, if it have past. So to get it work in realtime, I first analyze the audio signal (in the audio process) and send the midi signal (direct from the audio process), at the same time it finish the audio tread and jump out of your speakers. There it will meet the output from your synthy. :lol:

try it out.

edit.// now guitarix use multitread for midi processing :D

edit.// just another hint, if you have a micro, and I belive you have, conect your micro with guitarix, stop the audi engine and connect the midi output with your synthy. Choose some drumlayers for the first channel (if you use fluidsynth it's channel 9) set the sensity delay to 0. For the secound channel choose a sitar (104) (sensity delay 4) and for the third channel choose a kalimba(sensity delay 6). Use your micro like you use a conga. Take care that you dont fly to high :mrgreen:
brummer

Re: guitarix go's midi

Post by brummer »

Thanks to Orcan Ogetbil (Fedora) I could improve the frequence to Midi Note conversion, he give me a hint to a problematic conversion, float() to int()) witch I do now with round(), that way the correct detected Note range is grow.
For those are interessting in audio2midi converting, have a look in the guitarix svn repostory.
User avatar
funkmuscle
Established Member
Posts: 2984
Joined: Mon Jun 02, 2008 2:30 pm
Has thanked: 194 times
Been thanked: 50 times

Re: guitarix go's midi

Post by funkmuscle »

how does it work? I've connected guitarix to qsynth but no sound. qsynth receives the midi signal but no sound... Am I doing this right?
brummer

Re: guitarix go's midi

Post by brummer »

When you have enable Midi_out you see a little very small button in the under left corner, it's like the buttons for advanged settings widget's. There you get the setup widget for midi_out.
The midi signal will trigger't by a beatdetector, go to the tab "beatdetector" and set down "atack beat" to 0.01. Now look in the chanel1 tab, set down the sensity to 1. Make sure that you use every channel just once, (channel1 to channel 9,channel2 to channel 2, channel3 to channel 1, for example).

If you dont hear a synth output, enable anti aliase and set the little slider to the right side.
Use only (1) the pickup near to the nack.

If you get to mutch midi output then, set the atack beat level higher.
atack note meen's "how many Notes detected befor use a beat"
note on meen's "how many sampels analyse befor give out a Note"
note of meen's "how many empty beats, befor send a all note off message to the synthy"

With the sensity (channel) you can set the sensity for every channel. You can select the synth channel, program, velocy, gain, and you can switch the octave for every channel.
User avatar
funkmuscle
Established Member
Posts: 2984
Joined: Mon Jun 02, 2008 2:30 pm
Has thanked: 194 times
Been thanked: 50 times

Re: guitarix go's midi

Post by funkmuscle »

did all that. I don't know if you're familiar with qsynth but on qsynth, when you load a soundfont, you get the qsynth tabs, numbered 1, 2, etc.
then under channels you get the banks for the soundfonts. when I run my guitar thru guitarix, connect it to qsynth, I then connect the synth output in qjackctl to the pcm output.
under the midi tab in qjackctl, I connect guitarix to qsynth.
on qsynth, the tabs lights up when I hit a note on the guitar but under channels, no lights on the soundfonts chanels.
I try vkeybd to make sure that qsynth is fine and yes, I hear a note and the channel indicates it's receiving the signal..
So part of the signal from guitarix is getting to qsynth but not the channels.
thorgal
Established Member
Posts: 739
Joined: Mon Apr 07, 2008 6:04 pm

Re: guitarix go's midi

Post by thorgal »

oho, I completely forgot to try the MIDI out of guitarix ... I'll give it a try when I can (am very busy ATM).

PS: goddamn, this website is slow sometimes ...
brummer

Re: guitarix go's midi

Post by brummer »

I don't know if you're familiar with qsynth but on qsynth, when you load a soundfont, you get the qsynth tabs, numbered 1, 2, etc.
I use it mostly with qsynth/fluidsynth. :)
But note, the channel numbers in qsynth dont show the real midi channel numbers, midi channel 0 is in qsynth channel 1, and so on.
when you open the channel tab in qsynth, and change the program number in the guitarix midi tab, you can see how qsynth change the program as soon you hit a string.
Have you incrase the velocity and the volume knobs ? Maybee switch the oktave to -1 or -2 ?
Could you have a look if the tuner show the note's,
If you dont can bring it to work with your guitar, please try it with a micro, if you get synth output then, let me know the result. If so, it meen that your guitar output level is lower than I guess, that I can set the minimal gain for the beatdetactor to a lower level.

And connect only one port with guitarix_in.
thorgal
Established Member
Posts: 739
Joined: Mon Apr 07, 2008 6:04 pm

Re: guitarix go's midi

Post by thorgal »

brummer, I don't get it to work either. I also tried to "snif" with kmidimon, but nothing.
brummer

Re: guitarix go's midi

Post by brummer »

mmm, strange, . . .
what's your jack settings ? could you try it with frame/rate 128 and sample/rate 48000 ?
User avatar
funkmuscle
Established Member
Posts: 2984
Joined: Mon Jun 02, 2008 2:30 pm
Has thanked: 194 times
Been thanked: 50 times

Re: guitarix go's midi

Post by funkmuscle »

frame/rate 128 and sample/rate 48000... that's my settings... still not working.
brummer

Re: guitarix go's midi

Post by brummer »

what's with the tuner, did it show the note's ?
If so, I need to rework the trigger point for the beatdetector (open it a bit and set it to a lower level)
User avatar
funkmuscle
Established Member
Posts: 2984
Joined: Mon Jun 02, 2008 2:30 pm
Has thanked: 194 times
Been thanked: 50 times

Re: guitarix go's midi

Post by funkmuscle »

no activity with the tuner.... nothing at all
Post Reply