tarmoj / tarmoj.github.io

Tarmo Johannes's site
0 stars 0 forks source link

csound.hpp library #1

Open cuatrocuatros opened 8 years ago

cuatrocuatros commented 8 years ago

Hey Tarmoj. I am developing a new sound application in QtCreator. I need to use functions from Csound to do the sound effects that I want, but I don't know how to do it. I saw your examples but I don't know where I can download the library csound.hpp to include it on my code. If you can help me I would be very pleased. Sorry for my poor english.

Regards.

tarmoj commented 8 years ago

Hi,

Csound and Qt is a good choice!

What is your operating system? What is your experience with Csound? You can download Csound from http://csound.github.io/download.html For OSX and Windows the header files are included in the installer, in case of linux, download the source code, build Csound and install it (see https://github.com/csound/csound/blob/develop/BUILD.md for insntructions) If you are on Debian/Ubuntu, you should be able to install csound and csound-dev with apt-get install but I am not sure which repositories you must activate.

Let me know how it goes!

tarmo

2016-05-12 18:30 GMT+03:00 cuatrocuatros notifications@github.com:

Hey Tarmoj. I am developing a new sound application in QtCreator. I need to use functions from Csound to do the sound effects that I want, but I don't know how to do it. I saw your examples but I don't know where I can download the library csound.hpp to include it on my code. If you can help me I would be very pleased. Sorry for my poor english.

Regards.

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/tarmoj/tarmoj.github.io/issues/1

cuatrocuatros commented 8 years ago

Wow, thank you for answering so quickly. I will explain to you:

I'm doing my final work dregree (Telecom Engineer - Sound Specialization) and it is about creating a new application (using Qt Creator) divided into 4 contents. "Sound Effects", "Midi Control", "Kinect" and "Sensors Control". I wanted to start with "Sound Effects" and that's why I asked you that. I already have installed Csound and QtCreator, but I don't know how to include the API from Csound to QtCreator and how it has to be the code I have to write on QtCreator and in which files: Headers, main.cpp, window.cpp... My experience with Csound is 0, and with QtCreator... I did 3 years ago a program but I don't remember too much... To start, once I have the API of Csound included, my first step will be a simple thing. Load a mp3 file and do the effects that I want with it. Thank you.

Ricky.

tarmoj commented 8 years ago

Hi,

Once again - what is your operating system?

then first thing you need to do is some learning. For Csound the best material to start with is the FLOSS manual http://write.flossmanuals.net/csound/preface/ The official manual is here: http://www.csounds.com/manual/html/

Also there is plenty of great examples in CsoundQt the main user interface that comes with the OSX and Win installer.

I suggest start with CsoundQt and see first if you get your sound side working (ie write a csound file (.csd) that works and does what you want). To get you started I will copy a simple example below you can continue with.

About Csound API there is a chpater (not very good one though): http://write.flossmanuals.net/csound/a-the-csound-api/ and examples in C++ https://github.com/csound/csoundAPI_examples/tree/master/cpp

Also have a look at my project https://github.com/tarmoj/eclick/tree/master/server That is a cross-platform application with csound that works on linux, windows and osx - have a look to the .pro file to see how the libraries and header files are

Aslo I suggest to join Csound mailing list for all further questions: http://csound.github.io/community.html

Take care! tarmo

; example on playing/processing mp3. Put a mp3 file to the same folder where is your csd and change name, if necessary

-odac -d sr = 44100 ksmps = 32 nchnls = 2 0dbfs = 1 schedule 1,0,10 ; play instrument 1 for 10 seconds instr 1 aL,aR mp3in "test.mp3" ; get sound from mp3 aL rezzy aL, line:k(100,p3,4000), 90 ; resonant filter, frequency changes from 100 to 4000 on the duration of instrument playing aR rezzy aR, line:k(4000,p3,100), 90, 1 ; similar but filter in highpass mode in right channel outs aL, aR endin

2016-05-13 15:49 GMT+03:00 cuatrocuatros notifications@github.com:

Wow, thank you for answering so quickly. I will explain to you:

I'm doing my final work dregree (Telecom Engineer - Sound Specialization) and it is about creating a new application (using Qt Creator) divided into 4 contents. "Sound Effects", "Midi Control", "Kinect" and "Sensors Control". I wanted to start with "Sound Effects" and that's why I asked you that. I already have installed Csound and QtCreator, but I don't know how to include the API from Csound to QtCreator and how it has to be the code I have to write on QtCreator and in which files: Headers, main.cpp, window.cpp... My experience with Csound is 0, and with QtCreator... I did 3 years ago a program but I don't remember too much... To start, once I have the API of Csound included, my first step will be a simple thing. Load a mp3 file and do the effects that I want with it. Thank you.

Ricky.

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/tarmoj/tarmoj.github.io/issues/1#issuecomment-219033451

cuatrocuatros commented 8 years ago

Hi Tarmo,

I have Windows 8.1, a Toshiba with CORE i5 processor. Thanks a lot for all of this information, if I have any doubt I will ask you.

Regards,

Ricky

cuatrocuatros commented 8 years ago

Hello again, Tarmo!

This is the repository of my Qt Creator Project using Csound (I'm starting it): https://github.com/cuatrocuatros/TFG

First of all, when I want to run it, I have a problem that is showed in the "ProblemLibrary.jpg" file, it is related with the needed library. ¿How can i solve that? You can see where I have the Csound libs on "CsoundLibs-jpg" file. My version of Csound is 0.9.2.1 and QtCreator 3.6.1 (Based on Qt 5.6.0).

Second, what I did is, I created a button "AudioMorphing", I did a slot "on_pushButton1_clicked()" in "mainwindow.cpp" where I playback the .csd file using a csound instance. Is it well located there? Or it goes in another function or file to work? I'm a bit lost.

Thanks for your help.

Ricky