A bare bones framework for audio DSP on a PC - Page 3 - diyAudio
Go Back   Home > Forums > Source & Line > PC Based

PC Based Computer music servers, crossovers, and equalization

Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 31st July 2012, 11:41 PM   #21
diyAudio Member
 
steph_tsf's Avatar
 
Join Date: Mar 2008
Hello, I did the required changes in the VC++2010 code, however there is still an error generated by the compiler. See attached .jpg.

Problem seems to be somewhere in :
for (a = 0; name = BASS_RecordGetInputName(a); a++)
{
float vol;
int s = BASS_RecordGetInput(a, &vol);
printf("%d: %s \n", a, name);
}
Attached Images
File Type: jpg error line 146.jpg (279.1 KB, 125 views)

Last edited by steph_tsf; 31st July 2012 at 11:46 PM.
  Reply With Quote
Old 1st August 2012, 12:14 AM   #22
diyAudio Member
 
Join Date: Feb 2009
Location: UK
Quote:
Originally Posted by steph_tsf View Post
Hello, I did the required changes in the VC++2010 code, however there is still an error generated by the compiler. See attached .jpg.

Problem seems to be somewhere in :
for (a = 0; name = BASS_RecordGetInputName(a); a++)
{
float vol;
int s = BASS_RecordGetInput(a, &vol);
printf("%d: %s \n", a, name);
}
Hello Steph

I lifted that bit of code straight from one of the supplied BASS examples. It gives me a warning with Codeblocks, but not an error.

I think the solution is to add a (char *) cast in front of BASS_RecordGetInputName - this seems to get rid of the warning for me.

Hope that sorts it for you.

Edit: what sound card will you be using?

Last edited by CopperTop; 1st August 2012 at 12:17 AM.
  Reply With Quote
Old 1st August 2012, 11:03 AM   #23
diyAudio Member
 
steph_tsf's Avatar
 
Join Date: Mar 2008
Quote:
Originally Posted by CopperTop View Post
What sound card will you be using?
Here is the setup I'm using.
This is a notebook computer having the Realtek HD Audio on the mainboard. On such mainboard there are only two outputs (left and right) wired to the external world.

I'm using VAC as virtual sound card driver, collecting the audio that's coming from Winamp (Virtual Cable 1). This is done by instructing Winamp to use the WaveOut modality, with Virtual Cable 1 defined as peripheral where to send the audio.

I'm using ASIO4ALL v2 as Universal ASIO Driver For WDM Audio.

In the ASIO4ALL control panel, I instruct ASIO4ALL to only consider as audio input stream, the audio that's coming from Virtual Cable 1.

In the ASIO4ALL control panel, I instruct ASIO4ALL to only consider as audio output stream, the audio that needs to be sent to the Realtek HD Audio output.

Within Synthmaker, for dealing with ASIO instead of the standard Windows Direct Sound, all you need to do is to select the "ASIO in" module from the toolbox. Drag and drop it on the Synthmaker design sheet. Click on the blue label for activating it. It may not activate until you have placed the "ASIO out" module also. You thus need to select the "ASIO out" module from the toolbox. Drag and drop it on the design sheet. Click the inner label under the "ASIO in" name. When this is done, both the ASIO in and the ASIO out modules inner labels should turn blue (instead of staying gray). The ASIO4ALL status bar should come alive, meaning that Synthmaker said to ASIO4ALL that there is some audio to deal with.

I was expecting to see Virtual Cable 1 delivering two audio streams consisting on the left audio and the right audio (Virtual Cable 1 1, Virtual Cable 1 2), but in reality wiewd from Synthmaker there is a Virtual Cable 1 3 showing also. Don't know if this relates to the lapotop motherboard mike input.

Regaring the ASIO out module, we have HD output 1, HD output 2, ... HD output 8. But as said above, only the two first ones are really there, in hardware, on my laptop motherboard.

The attached VAC+ASIO4ALL.osm does a Linkwitz-Riley delay-compensated crossover (1981 AES Los Angeles Convention).

When you have Winamp, Synthmaker, VAC and ASIO4ALL installed and configured, all you need to do is to double click the VAC+ASIO4ALL.osm file.

When doing so, Synthmaker opens and displays the design sheet. It reads the Virtual Cable 1 1 mono audio channel, then splits it in highpass (HD output 1) and lowpass (HD output 2). On my laptop, lowpass goes to the left speaker, and highpass goes to the right speaker. The "delay" cursor enables to manually control the delay, for exactly matching the lowpass group delay. The "bass" control allows controlling the bass volume, like reducing it for better hearing the audio effect on the highpass when modifying the delay. Clearly there is an optimal value for the delay, and this is precisely what makes the interest of the the Linkwitz-Riley delay-compensated crossover. Using some optimal delay, you can hear the highpass slope increasing. Due to its subtractive structure, the Linkwitz-Riley delay-compensated crossover provides a perfect reconstructed phase. When using a Bessel lowpass instead of a Butterworth lowpass, the relative phase shifts (between lowpass and highpass) in the transition band get very small. In 1999, Berchin theorized such delay-compensated arrangement using different lowpass filters as kernel, including digital lowpass filters that are not realizable using analog, and he provided an optimization avoiding ringing/preshoot and possibly relative phase shifts too. Kind of perfect crossover would you say!

When you have Winamp, Synthmaker, VAC and ASIO4ALL installed and configured, all you need to do is to double click VAC+ASIO4ALL.osm, and the winamp sound should get split the way described above. If you hear no sound you need to check the Winamp and ASIO4ALL configuration, and restart Winamp and Synthmaker. If after checking this you still get no sound, or perhaps a sound that's not processed by Synthmaker, you need to re-instantiate the ASIO in and ASIO out modules, offering your system a chance to properly set the the whole processing instead of re-using someone else's parameters. Delete the ASIO in and ASIO out modules on the Synthmaker design sheet. Save the current .osm under another name. Quit Synthmaker. Reload the .osm (the one without the ASIO in and ASIO out modules). Drag and drop the ASIO in and ASIO out modules on the sheet, the way they used to be. You lost the corresponding wires. Connect the wires the way they used to be. Activate the ASIO modules (click the inner label under the name). Both ASIO in and ASIO out inner labels sould now turn blue. The ASIO4ALL status bar should come alive, meaning that Synthmaker said to ASIO4ALL that there is some audio to deal with. This way your audio system got completely rebuid. After restarting winamp, the sound should get properly processed.

This is the way I checked that my computer had ASIO working, using the motherboard HD Audio.

If the sound gets periodically disturbed by some noise, it means you are running VAC unregistered.

Last edited by steph_tsf; 1st August 2012 at 11:08 AM.
  Reply With Quote
Old 1st August 2012, 12:58 PM   #24
diyAudio Member
 
steph_tsf's Avatar
 
Join Date: Mar 2008
Quote:
Originally Posted by CopperTop View Post
I lifted that bit of code straight from one of the supplied BASS examples. It gives me a warning with Codeblocks, but not an error.
Strange, on my side, CodeBlocks reports a fatal error on that particular line 141. See attached .jpg.
Attached Images
File Type: jpg error line 141.jpg (282.5 KB, 17 views)
  Reply With Quote
Old 1st August 2012, 04:54 PM   #25
boris81 is offline boris81  United States
diyAudio Member
 
Join Date: Oct 2009
Location: white plains, ny
for (a = 0; name = (char*)BASS_RecordGetInputName(a); a++)

Casting should fix it as CopperTop explained already. It has to do with how strictly the compiler converts types. I'm sure it's adjustable in the compile options somewhere. I was able to compile in MSVC Express 2010 after applying the 2 casting fixes CopperTop suggested.
  Reply With Quote
Old 1st August 2012, 11:42 PM   #26
diyAudio Member
 
steph_tsf's Avatar
 
Join Date: Mar 2008
Thanks for your help; I have now the bare bones framework compiling OK, both in CodeBlocks and in Microsoft Visual C++2010 Express.

However they both compile fine, they behave differently when in run mode.

The CodeBlocks app generates the prompts and the reports on the console, on a correct way. This way we get the device list. In the task bar, we see some ASIO activity created by the app. For some reason, on my computer no sound gets generated. The cause may be ASIO4ALL, as I am trying to use the PC motherboard Realtek HD Audio with ASIO4ALL. Instead of using an external sound card having its own ASIO driver.

The Microsoft Visual C++2010 Express app doesn't run properly what's regarding the reports on the console. We don't get the device list. In the task bar, we see no ASIO activity created by the app. And there is no sound generated.

Last edited by steph_tsf; 1st August 2012 at 11:46 PM.
  Reply With Quote
Old 1st August 2012, 11:52 PM   #27
diyAudio Member
 
steph_tsf's Avatar
 
Join Date: Mar 2008
A few pictures when compiling on Microsoft Visual C++2010 Express
Attached Images
File Type: jpg 0 - MSVC++ how to include bass.h and bassasio.h.jpg (272.6 KB, 9 views)
File Type: jpg 1 - MSVC++ build OK.jpg (52.5 KB, 7 views)
File Type: jpg 2 - MSVC++ running but no sound.jpg (63.9 KB, 4 views)
File Type: jpg 3 - MSVC++ no ASIO4ALL activity.jpg (22.1 KB, 4 views)
  Reply With Quote
Old 1st August 2012, 11:53 PM   #28
diyAudio Member
 
steph_tsf's Avatar
 
Join Date: Mar 2008
A few pictures when compiling on CodeBlocks
Attached Images
File Type: jpg 0 - CB how to include bass.h and bassasio.h.jpg (229.2 KB, 6 views)
File Type: jpg 1 - CB warnings at build.jpg (114.3 KB, 4 views)
File Type: jpg 2 - CB running but no sound.jpg (94.9 KB, 4 views)
File Type: jpg 3 - CB ASIO4ALL activity when running.jpg (49.2 KB, 5 views)
Attached Files
File Type: zip CopperTop.zip (330.6 KB, 2 views)
  Reply With Quote
Old 2nd August 2012, 10:21 PM   #29
diyAudio Member
 
steph_tsf's Avatar
 
Join Date: Mar 2008
I have problems with CM6206-based External USB Sound Cards operating under ASIO4ALL. I fail to individually access the 6 or 8 channels.

The CM6206 chip is a modernized version of the CM106 chip.
The Trust SC-5500P 5.1 External USB Sound Card has a CM106 inside.

On my WinXP SP3 computer, I have installed :

- a CM106-based Trust SC-5500P 5.1 External USB Sound Card
- a CM6206-based Sweex 7.1 External USB Sound Card
- a CM6206-based 5.1 External USB Sound Card "China import".

All three sound cards come with nearly the same setup utility for Windows. Of course those setup utilities are not involving ASIO4ALL. After rebooting the computer one should see a new icon in the Windows task bar, if there is a USB sound card plugged in. This gives access to a Windows utility enabling to decide how many output channels must be in use and enabling to identify the audio outputs individually (first tab), and a volume controller/mixer (second tab). For the three different sound cards (Trust, Sweex, China import), all channels are there, without crosstalk. Looks thus encouraging, of course this is management under WDM, not under ASIO4ALL.

Let's now see how it works under ASIO4ALL.

In the Windows System Control panel, I de-activated the onboard Realtek HD Audio sound hardware. This way ASIO4ALL should not mess with the motherboard Realtek HD Audio harware.

Of course I have ASIO4ALL installed.

I then installed ASIOSigGen (free utility easy to find on the web).
Sending a 60 second -12 dB white noise, selectively to channels 1/2, 3/4, 5/6 or 7/8.

This is where it gets interesting.
ASIOSigGen results are perfect using the CM106-based sound card (Trust SC-5500P).
ASIOSigGen results are a mess using the CM6206-based sound cards (Sweex and China import). When sending to 1/2, all outputs gets energized. When sending to 7/8, not only 7/8 gets energized, but 5/6 also.

I did a few channnel 1/2, 3/4, 5/6 and 7/8 tests using Synthmaker and ASIO4ALL.
The results are the same as above. The tests run fine on the CM106, and run messy on the CM6206 (channel 1/2 energizes all channels, as example).

I did a test using the CopperTop CodeBlocks code, hoping the CM106 would work. Unfortunately the CM106 remains muted. The CM6206 also remains muted.

Do you know some multichannel External USB Sound Cards operating under ASIO, not ASIO4ALL? Delivered with a good ASIO driver? Which one would you recommend?

P.S.
In the CM106 Windows utility, a huge mishap occurs regarding the line-input as soon as the volume wheel gets hit (second tab - mixer). Turning the volume wheel, there is some weird internal mixing occurring inside the CM106, kind of analog loopback, taking the line-input (left and right), copying it to output 1/2 (front left and front right).
The only way I found for getting rid of the loopback, is pull out the USB plug, then plug it in.
The CM6206 situation is worse. The infamous loopback is always there, even before you turn the volume wheel in the mixer tab.
I have the impression that my computer gets crazy about all those USB sound cards. Later on, I'll try with another computer, and see if such loopback shows.

A few attached .jpg

Last edited by steph_tsf; 2nd August 2012 at 10:26 PM.
  Reply With Quote
Old 2nd August 2012, 11:33 PM   #30
diyAudio Member
 
Join Date: Feb 2009
Location: UK
I like the idea of the ASIO signal generator. Unfortunately I have very little experience with USB sound cards, except for a little TI-based board I had, that sent damagingly-loud thumps to the speakers whenever unplugged, or the PC powered down.

For what it is worth, my advice would be to buy a secondhand Dell GX520 minitower (near silent) with Windows XP for literally 40 euros including P&P off eBay, and a Creative X-Fi card (not 'Xtreme Audio' which is not a true X-Fi card) for about the same price. Then, when that setup is working, upgrade to the better sound card etc.
  Reply With Quote

Reply


Hide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
FS: Frequency Allocator PC crossover and DSP program jdubs Swap Meet 2 16th May 2012 03:28 AM
What DSP is suitable for audio? Snickers-is Parts 2 1st June 2006 03:50 AM
PC DSP crossover. Anyone interested in testing? Thunau Multi-Way 0 26th February 2006 11:14 PM
DSP Audio reverb Gold_xyz Digital Source 0 13th December 2005 03:54 PM
How come the bones in take-out chicken are so soft? Cal Weldon The Lounge 6 5th February 2005 02:32 PM


New To Site? Need Help?

All times are GMT. The time now is 03:36 AM.


vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
Copyright 1999-2014 diyAudio

Content Relevant URLs by vBSEO 3.3.2