Tuner Graphics and Implementation

•March 13, 2008 • Leave a Comment

We got some good work done on the tuner today. I got to grips with Adobe Fireworks to produce the images for the graphical representation. Fireworks is an awesome piece of kit, with buckets of features and options, and so it took me a little while to get to grips with it. We reasoned this time was well spent though, as we now have unique images for our system, rather than ones lifted off the net, which is what we were originally going to do. Hopefully we’ll get to do a bit more in Fireworks (the music theory tutor and some more logos spring to mind) if time permits.

Conor started integrating the tuner into the GUI. He is using a nice class called RotatePanel (described here), which ensures a smooth transition between the needle states.

Anyway, heres a screen shot of how it looks so far:

Tuner
Fig 1 – Tuner
.
We have been neglecting our other assignments of late, so we plan to take a bit of a break from the 4th year project now and concentrate on them for a bit. We are pretty well on schedule, with the effects, groovebox, half of the music theory tutor and now the tuner done. All that remains is to have the music theory tutor drawing the chords out (which we have thought a good deal about and are confident that we have an algorithm that will do this – it just requires testing) and key recognition, which we have been steadily researching and have good ideas about too.
.

Tuner Research and Matlab Implementation

•March 12, 2008 • Leave a Comment

We started seriously looking at the tuner again today. We want to have a moving needle that moves in as close to real time as possible. The hard part here is that Matlab needs a longish (when we are talking in real time) sample to analyse. We need to find a balance between the length of the sample Matlab needs and what is an acceptable time delay for th euser to experience. For the minute, we’ve settled on a 2 second sample, but it may prove that this is too long.

We read this into Matlab using audiorecorder, pausing every 2 seconds.

The method we wrote in Matlab finds the fundemental frequency (which, for the tuner, will usually be the first note encountered in the sample, or else the highest peak) of the note and outputs it back to Java. This is quite easy to accomplish as all that is needed is to FFT the sample, find the highest peak, divide this by the length of the sample and multiply it byt the sample rate (divide by 2, mulitply by 1 in our case as the sample is 2 seconds long). This method works, in that it returned the correct note to us during testing. It remains to be seen if the 2 second sample is too long once we get a graphical representation of the tuner into the GUI. ..

GrooveBox – Extra Features

•March 10, 2008 • Leave a Comment

Ive added the clear all button and a 3/4 time option to the Groovebox. 3/4 time proved to be a lot more difficult than I anticipated to implement. Jtable can be quite annoying when it wants to be. My perseverance paid off though, and the way it stands now you can easily which between 3/4 time and 4/4 time without reseting either beat – which is nice.

I also added a slider for changing the BPM that allows you to change the tempo in real time. The current BPM is displayed in a text box beside the slider for fine tuning.

Here are the promised screenshots of the finished module:

 

GroovBox 3/4 Time
Fig 1 – GrooveBox, 3/4 Time
GrooveBox - 4/4 Time
Fig 2 – GrooveBox, 4/4 Time

 

 

GrooveBox – Sorted

•March 6, 2008 • Leave a Comment

I rethought the technicalities of the Groovebox and decided it wasnt feasible to create it in Matlab. So I did some more research before arriving at the solution i had been looking for:

Midi.

Midi stands for Musical Instrument Digital Interface. Midi doesnt transmit an audio signal. Rather, it simply transmits digital data “event messages”. This solved my problem with the pitch issues when changes the tempo of the drum loops. It also solved my sample decay length problem as it just so happens that there is a midi class in java sound. This has solved all my problems quite nicely.

Since settling on midi drums, I have been working on putting the whole thing together. I now have a fully functioning Groovebox that Im quite proud of and that works well. There are a few things Im hoping to add to it, such as a clear all button to reset the table, but as it stands Im happy out with it. Ill post a screen shot of it soon.

GrooveBox Update

•March 4, 2008 • Leave a Comment

I decided to go with the Jtable option for the groovebox because it will cut down on the lines of code involved, and also because i think it looks better (this is probably due to years of messing around Fruity Loops). With that decision made I began to look at how a loop would actually be created in our system. I dug up some old drum samples i had sliced up a while ago and began trying to put them together in Matlab, using the function I described in a previous post. This worked to a certain extent, but i began to run into problem when it came to instruments such as crash cymbals that have a longer decay time than say a snare drum. The problem here is that the crash decay needs to extend out over the other instruments. As it stands, my function waits for the crash sample to finsh before concatenating another sample onto the end of it, which puts the whole loop out of time.

Also, more worryingly, increasing or decreasing the tempo squashes or stretches the loop, resulting in undesirable effects. Time for a rethink…

Meeting with Alistair 03/03/08

•March 3, 2008 • Leave a Comment

We had a meeting today to keep Alistair updated with what we have working so far. He seemed fairly impressed by all the effects. He did suggest that we look a pitch shifting effect, which we might go back to at the end of development if we have time. At the moment we have 7 working effects, which we think is enough for now.

Other than that, we just discussed our plans for the week, namely me continuing work on the groovebox and Conor doing some redesign work on the GUI to make it more object orientated.

Repeater, Synth and Random Convolution Delay

•March 3, 2008 • 1 Comment

We finalised our TEF effect today. We decided on 3 different parameters, which we called repeater, synth and convolution delay.

Repeater basically takes your input signal and replicates it. This is then fourier transformed and values at a user defined interval are set to zero. This creates a loop of a part of the sample. The length of the loop is inversely proportional to the interval defined by the user. The original signal is then added over the loop. This adds an interesting depth to the sample.

The synth effect is basically a low pass filter where the sample is fourier transformed and every value underneath a user defined value is set to zero. The greater this value, the more ethereal the sample becomes. Very cool.

The convolution delay is a random effect. it allows the user to set up their own impulse response by allowing the number of teeth of a comb to be selected. The neat thing here is that it then places these spikes randomly on the comb. This comb is then fourier transformed and multiplied by the fft of the orginal sample (convolution). This leads to some really cool random effects. The greater the number of teeth, the more complicated the effected sample becomes.

This effects are pretty unique, and you wont find these combined into a stomp box anywhere. We feel that these effects will help to add originality to our system.

 
Follow

Get every new post delivered to your Inbox.