Help to record and play audio through my speakers

Support & discussion regarding DAWs and MIDI sequencers.

Moderators: MattKingUSA, khz

Post Reply
boobab
Established Member
Posts: 11
Joined: Wed Jul 02, 2014 2:08 am

Help to record and play audio through my speakers

Post by boobab »

First of all, folks, let me tell you - I am complete newb. I recently bought Casio px-150 digital piano and decided to hook it up to a computer through USB. lsusb shows casio interface. Now, ideally for now I want to record some pieces to disk. For this reason I installed Ardour, so it has recording feature. I am not even sure if it is a right tool for this. I just tought that I can grow by learning the program and do some other staff with it. Anyway, I also have Qjackctl installed as it is required by Ardour. Jackd seems working, here is an output:

15:16:25.012 D-BUS: JACK server was started (org.jackaudio.service aka jackdbus).
Thu Jul 10 15:16:24 2014: Starting jack server...
Thu Jul 10 15:16:24 2014: JACK server starting in realtime mode with priority 10
Thu Jul 10 15:16:24 2014: Acquired audio card Audio1
Thu Jul 10 15:16:24 2014: creating alsa driver ... hw:1,0|hw:1,0|1024|2|44100|0|0|nomon|swmeter|-|32bit
Thu Jul 10 15:16:24 2014: configuring for 44100Hz, period = 1024 frames (23.2 ms), buffer = 2 periods
Thu Jul 10 15:16:24 2014: ALSA: final selected sample format for capture: 32bit integer little-endian
Thu Jul 10 15:16:24 2014: ALSA: use 2 periods for capture
Thu Jul 10 15:16:24 2014: ALSA: final selected sample format for playback: 32bit integer little-endian
Thu Jul 10 15:16:24 2014: ALSA: use 2 periods for playback
Thu Jul 10 15:16:25 2014: graph reorder: new port 'system:capture_1'
Thu Jul 10 15:16:25 2014: New client 'system' with PID 0
Thu Jul 10 15:16:25 2014: graph reorder: new port 'system:capture_2'
Thu Jul 10 15:16:25 2014: graph reorder: new port 'system:playback_1'
Thu Jul 10 15:16:25 2014: graph reorder: new port 'system:playback_2'
Thu Jul 10 15:16:25 2014: New client 'PulseAudio JACK Sink' with PID 1481
Thu Jul 10 15:16:25 2014: Connecting 'PulseAudio JACK Sink:front-left' to 'system:playback_1'
Thu Jul 10 15:16:25 2014: Connecting 'PulseAudio JACK Sink:front-right' to 'system:playback_2'
Thu Jul 10 15:16:25 2014: New client 'PulseAudio JACK Source' with PID 1481
Thu Jul 10 15:16:25 2014: Connecting 'system:capture_1' to 'PulseAudio JACK Source:front-left'
Thu Jul 10 15:16:25 2014: Connecting 'system:capture_2' to 'PulseAudio JACK Source:front-right'
Thu Jul 10 15:16:26 2014: Saving settings to "/home/asterius/.config/jack/conf.xml" ...
15:16:27.274 JACK connection change.
15:16:27.275 Server configuration saved to "/home/asterius/.jackdrc".
15:16:27.275 Statistics reset.
15:16:27.300 Client activated.
15:16:27.328 JACK connection graph change.
Thu Jul 10 15:16:27 2014: New client 'qjackctl' with PID 1781

First that I noticed is that I can't hear the sound from speakers when jackd is started, though I have pulseaudio jack module installed. Why is that? When I record with ardour I can't hear the sound also. So, how do I at all can play the sounds through the speakers when I play my keyboard? Totally clueless. That is what I have in "connect" dialog for "alsa" tab: 14: Midi Through -> 0: Midi Through Port-0; 24: CASIO USB-MIDI --> 0: CASIO USB-MIDI MIDI 1. What do I cannect to what? What else do I miss and have to pay attention? Thank you for suggestions and advice
User avatar
Scary Hallo
Established Member
Posts: 280
Joined: Fri Oct 23, 2009 2:21 pm
Location: Germany / Pforzheim
Contact:

Re: Help to record and play audio through my speakers

Post by Scary Hallo »

You need something to produce a sound from your midi-signal. E.g. ZynSubAdFx
Connect your casio to the midi-input and zyn and connect the audio outputs of zyn to your system outputs (playback_1 and playback_1)
boobab
Established Member
Posts: 11
Joined: Wed Jul 02, 2014 2:08 am

Re: Help to record and play audio through my speakers

Post by boobab »

Scary Hallo wrote:You need something to produce a sound from your midi-signal. E.g. ZynSubAdFx
Connect your casio to the midi-input and zyn and connect the audio outputs of zyn to your system outputs (playback_1 and playback_1)
This is confusing. Do you mean in Qjackctl? I also noted that in set up dialog of Qjackctl Midi driver is set to "none". Is that how it is supposed to be?
boobab
Established Member
Posts: 11
Joined: Wed Jul 02, 2014 2:08 am

Re: Help to record and play audio through my speakers

Post by boobab »

Right now I am digging into jack with pulseaudio set up: https://github.com/jackaudio/jackaudio. ... ulseOnJack

Quote: Redirecting ALSA to PulseAudio

Use the following settings in /etc/asound.conf (or $HOME/.asoundrc)

pcm.pulse {
type pulse
}

ctl.pulse {
type pulse
}

pcm.!default {
type pulse
}
ctl.!default {
type pulse
}

I don't have asound.conf in my /etc/ and I don't have .asoundrc in my /home directory. Should I create this file?
User avatar
Scary Hallo
Established Member
Posts: 280
Joined: Fri Oct 23, 2009 2:21 pm
Location: Germany / Pforzheim
Contact:

Re: Help to record and play audio through my speakers

Post by Scary Hallo »

boobab wrote:Do you mean in Qjackctl?
Sorry I didn't see Casio is a full piano. I thought it is just a keyboard without audio output. Sorry, I don't know this device.
What distro do you have?
Maybe this http://www.linuxjournal.com/article/8354 article might be helpful.
Pablo
Established Member
Posts: 1274
Joined: Thu Apr 17, 2008 9:57 pm
Been thanked: 3 times

Re: Help to record and play audio through my speakers

Post by Pablo »

you have two options to record from your keyboard to the computer. You can record MIDI or you can record audio. I guess you want the latter.

So I will assume that you have connected a cable from the audio output of your Casio PX-150 to the audio input of your laptop and you want to record in ardour. As a first step, you want to play live and listen through your laptop's speakers. Am I right?

If so, let's forget about MIDI, pulseaudio and sound configuration files for the time being. This means, forget by now the ALSA and MIDI tabs of qjackctl's connection window as both are for MIDI connections and focus on the Audio tab. You have system captures and system playbacks. "System" refers to the audio card that jack is using, in this case, your computer's audio card. The jack audio captures and playbacks are the "digital side" of the physical audio inputs and outputs.

[ Casio PX150 audio output --> (physical cable) Computer Audio Input (analog side) ] : AD conversion : [ Jack audio "system captures" (computer side) ]

[ Jack audio "system playbacks" ] : DA conversion : [ Computer audio output --> Speakers]

The simplest you can do for testing purposes is playing live through jack. For this you have to connect (virtually, in qjackctl) the system captures to the system playbacks:


[ Casio PX150 audio output --> (physical cable) Computer Audio Input (analog side) ] : AD conversion : [ Jack audio "system captures" --> (virtual connection, audio tab of qjackctl) Jack audio "system playbacks" ] : DA conversion : [ Computer audio output --> Speakers]

So the final result is:

Casio PX150 audio output --> Computer speakers

There are two aspects in the AD and DA conversions. One of them is jack's job and it should just work, but you might have to tweak the audio card's capture and playback levels which are in a lower level (nearer to the hardware, no pun intended) than jack itself. So you have to check this tool called alsamixer. Open it in a terminal, for card hw:1, the comand should be:

Code: Select all

alsamixer -c1
Check capture and playback levels. Use the keyboard, as documented here, KEYBOARD COMMANDS:
http://alsa.opensrc.org/Alsamixer
boobab
Established Member
Posts: 11
Joined: Wed Jul 02, 2014 2:08 am

Re: Help to record and play audio through my speakers

Post by boobab »

Pablo wrote:you have two options to record from your keyboard to the computer. You can record MIDI or you can record audio. I guess you want the latter.

So I will assume that you have connected a cable from the audio output of your Casio PX-150 to the audio input of your laptop and you want to record in ardour. As a first step, you want to play live and listen through your laptop's speakers. Am I right?
Thanks Pablo. You always come to my rescue. Well, approximately so. I just have hanged out with Ardour guys on their IIRC channel and they advice me to record as you describe; i.e. to hook my px-150 audio output to my my computer audio input. ( btw, just to confirm, can phone jack can be considered audio output?). They said that midi can also be recorded, but I need a synth plug-in in Ardour and have to properly configure MIDI on my system. What are the differences of those two methods? What is the better? Apperently I need a cable. I found one in the local shop, will it work? Please take a look:

http://www.ulmart.ru/goods/201140
bazsound
Established Member
Posts: 480
Joined: Sat Aug 03, 2013 11:46 am

Re: Help to record and play audio through my speakers

Post by bazsound »

the keyboards USB section is likely not an audio interface, rather it is a midi interface.

Put simply, midi transmitts digital information only relating to what keys are pressed, any channel information, as well as velocity and other parameters.

Midi programs use these to play sounds via various methods like synth plugins, samplers taking sounds from software and not the actual keyboard. In effect Midi is for using it as a controller really.

To record audio you would want to connect the audio outputs of your keyboard to the audio input on your computer. You can do it through the line ins on your soundcard though generally its better done using a dedicated sound card or interface. But internal sound card can work fine for simple home projects. If you have something to ack as a preamp in can work better though.
bazsound
Established Member
Posts: 480
Joined: Sat Aug 03, 2013 11:46 am

Re: Help to record and play audio through my speakers

Post by bazsound »

phone jack output? if you mean the headphone out on the keyboard, yes this can be used as an audio output
boobab
Established Member
Posts: 11
Joined: Wed Jul 02, 2014 2:08 am

Re: Help to record and play audio through my speakers

Post by boobab »

bazsound wrote:the keyboards USB section is likely not an audio interface, rather it is a midi interface.

Put simply, midi transmitts digital information only relating to what keys are pressed, any channel information, as well as velocity and other parameters.

Midi programs use these to play sounds via various methods like synth plugins, samplers taking sounds from software and not the actual keyboard. In effect Midi is for using it as a controller really.
Bazsound, in what situations MIDI is useful? For instance, Rosegarden supposedely takes MIDI input and writes notes ( sheet music)? this is something that appeals to me
User avatar
bluebell
Established Member
Posts: 1927
Joined: Sat Sep 15, 2012 11:44 am
Location: Saarland, Germany
Has thanked: 113 times
Been thanked: 122 times

Re: Help to record and play audio through my speakers

Post by bluebell »

If you record MIDI events instead of audio then you can easily edit the notes afterwards, play them faster or slower and change the sound on the playing device. The playing device can be a standalone program, a program as a plugin or a hardware device that can handle incoming midi events. You can even record and play MIDI events from a controller, say a pitch bend oder vibrator wheel.

Rosegarden has a nice score editor. I don't use it but others love it.

Linux – MOTU UltraLite AVB – Qtractor – http://suedwestlicht.saar.de/

Post Reply