Integrating effects

•February 22, 2008 • Leave a Comment

I spent all day today integrating the effects we have at the moment into the final GUI. There where a number of issues trying to do this. the main problem being the order in wihch the effects where added. For example if you delay a signal and then distort it, that would be fine, but if you wanted to remove the delay…. problem. You would need to redistort the original when you remove the delay and vice versa. this would have been easy to code some massive statments to get around this but i like a challange and so came up with a clever way to do it.

The original signal will be saved at all times as a matlab vector of doubles. A effectSignal vector is created each time the add effects button is selected, this vector is a copy of the original signal, each effect which has been chosen is then added to the vector. Each time you choose to use an effect a boolean value is set. This lets a effectController method know which effects are selected. When the methos is called it simply applies the selected effects to the effectVector. So when you add delay, the delay is added to the effect vector, add distortion and distorion is added to the same vector. Now remove delay and the programme will recreate the effect vector and add distortion in the backround.

Each time the signal gets an effect added to it the plot changes to represent the new frequency of the signal. Also the fft of the signal can be viewed with the changes present.

Next week we plan to integrate the reverb effect into the GUI and also something a little bit different which i will discuss next week.

Adding the effects

•February 21, 2008 • Leave a Comment

Busy day today. I have managed to add the elements to the GUI for using the effects that we have working at the moment(delay and distortion). It works well and redraws the plot each time to let the user see what is happening as they add the effects. The effects can be overlapped and removed one by one also. Very handy.

Here is an example screen:

Sample

Weird………

•February 21, 2008 • Leave a Comment

Had a good today messing about with the fft of signals and makinig some effects. The distortion effect is finished and working well with delay. One of the problems with distortion is the amount that we allow the user. Sometimes too much can just sound like fuzz. We were also messing about with adding delay to the ditorted signal and it sounds awsome.

After all the effects are done we will try adding them to the GUI.

Delay…..Delay…..Delay

•February 20, 2008 • Leave a Comment

Ok great yet headwrecking day today. Spent the entire day working on the delay effect. The premise is quite simple but the implementation is rather difficult.

The main problem was trying to overlap the signals in matlab at varying distances. This was overcome by setting up a method which will allow the user to enter there desired level of delay and then the system can on the fly handle any number of repeats at any distance. I have to say that i am very pleased with the results.

pre delay:

pre Delay

post delay:

post delay

Plan to incorporate this into the GUI tomorrow.

This is a major step as it is one effect down and it was a really good introduction to signal processing in matlab. Now that this effect is done anyone who wishes to use it just drop me a mail on conor.mullen@gmail.com and i will send you the source code.

Sampling Rates

•February 19, 2008 • Leave a Comment

Just doing a bit of work on managing the sample rates of the tracks today.

Have found some useful information here which explains the principles pretty well. there are two reasons why this may be useful, first of all it would be nice to display the length of a sample to the user. This involves finding out the sampling rate of the piece and also the total number of samples. this will be useful also for displaying a playing line in the GUI. Secondly we may may able to change the sampling rate at playbackc of a piece to produce some strange effects. Cool.

Module one

•February 18, 2008 • Leave a Comment

Ok so the playback and recording module is very nearly complete. I have spent all day adjusting some of the finer details to ensure a smooth run for the user. All the buttons are setup and linking properly. I just had to do some testing of different run scenarios to make sure that all options were available when they are suppose to be.

load

The final phase of the module will be to display the running time of the current sample to the user and also possible create a playing line which crosses the screen as the sample plays. This would be a nice touch and i will get working on it tomorrow.

Work will start tomorrow on the effects section of the interface, Hopefully we will be able to come up with some novel ways of displaying the effects to the user.

Lesson Learned……again

•February 18, 2008 • Leave a Comment

Ok so i had a major problem these last few days, what seemed like the simple task of getting the waveform from matlab to be displayed in java turned out to be a nightmare.

At first i decided to try and save the plot as a jpg image and then simply display this in a JLabel in the GUI. This involved having to finad a way to create a thumbnailed version of the plot as it would not fit in the GUI window, to do this i used a third-party thumbnail maker. This was all going well until i realised that java would not refresh what image it was loading into the JLabel as these thumbnails where being created on the fly. After spending the entire day trying to figure this out i turned to the jmatlink library for help. turns out there is a function to return a figure from Matlab as a java image….I could then just cast this image to a icon and display it in the Label.

Job done… now its time to eat.

Playback

•February 11, 2008 • Leave a Comment

Ok so most of the day was spent researching ways to add recording and playback functionality through java…. java being java this proved unbelievably complex… hours later we thought, hey lets try this in matlab. In the end it takes about 2 lines of matlab code to execute each function.

This will save us enourmous amounts of space and create a much easier to understand control flow for the program.

We use the matlab functions contained within audiorecorder to do this.

Next step is to change the save and load buttons in the GUI to call Matlab functions. This will again get rid of some of the initial complexity. Also it should be possible to output a plot of the signal to a jpg and then display this jpg to the user in the java GUI.

more on this soon

Liquidlnf

•February 9, 2008 • Leave a Comment

Ok so….. this is a plugin for eclipse that makes your GUI look all fancy.. dont be fooled though because it is the single most annoying thing ever to get working. As it stands i thought i had found the solution but when we tried to start another test case from scratch it bombed.

Here is the link to its homepage:

https://liquidlnf.dev.java.net/

More on how to fix tis when we actually figure out… how to fix this…

ok ok so i have finally  figured it out. I went to run the programme today and look and feel decided not to work so i had to fix it. The fix is as follows:

1. Extract the liquid source jar.

2. Import the source files into your project

3. You will notice that the class SwingUtilities2.java is missing, you need to create it in your com folder. Create the dir structure com.sun.java.swing and place the class located here into it .

4. Simply import com.birosoft.*; into your main program.

Boom.

Tuner – Ear training

•February 9, 2008 • Leave a Comment

I have completed the ear training portion of the Tuner today. This will enable the user to see the various tunings such as drop D, standard etc… and then play back the notes as they wish.

The main problem here involved finding a clever way of sending the requests to Matlab from java to play the notes. This was solved when Brendan did the work on passing functions to Matlab. This enabled me to send what note was selected with ease to our matlab function file which in turn wouldsound the note.

Sample screen