USDX icon indicating copy to clipboard operation
USDX copied to clipboard

[Feature Request] More then 2 channel mic

Open BenHamrick opened this issue 7 years ago • 8 comments

Would it be possible to support 4 channel mics. I have a device that supports 4 microphones and runs each mic over a separate channel. Currently UltraStar allows me to use 2 of the mics but does not allow the use of the other 2. Can this be added? Could someone point me in the right direction on which file I need to change to add this behavior?

BenHamrick avatar Dec 29 '17 18:12 BenHamrick

Having had a similar problem, I did some digging. The relevant file in my case was src/media/UAudioInput_Portaudio.pas as it contains the following lines of code:

// portaudio returns a channel-count of 128 for some devices                 
// (e.g. the "default"-device), so we have to detect those                   
// fantasy channel counts.                                                   
if (channelCnt > 8) then                                                     
  channelCnt := 2; 

Apart from the obvious discrepancies that 128, 8 and 2 are three vastly different numbers and it doesn't make much sense to mix them this liberally, changing the 8 or the 2 to a higher number both did the job for us insofar as the channels were then accessible via the settings.

But even though the code suggests that microphones reporting (e.g.) four channels should be supported, this is only partially the case. While the settings can be navigated using the keyboard, you need to remember what you did, as the UI is not up to the task. I would include a screenshot of the overlapping and hidden UI elements but GitHub refuses to accept my image.

Can this be added?

Probably.

Could someone point me in the right direction on which file I need to change to add this behavior?

Yes.

Finally, I suggest labelling this as a bug instead of a question.

HermannDppes avatar Jun 15 '19 18:06 HermannDppes

this is definitely still a feature request / improvement, not a bug. Anything with more than 2 channels currently is not supported, because that simply is not implemented yet. Similarly, you wouldn't tell a car manufacturer that "tractor wheels not fitting on a default car" is a bug.

@HermannDppes thank you for starting work on this new feature. Please feel free to submit a pull request if you are a software developer and have some spare free time.

basisbit avatar Jun 15 '19 18:06 basisbit

„We want to support soundcards with more channels.“ is a feature request, I agree. „If a soundcard reports more than two but less than nine channels, the UI cannot cope with that.“ seems like a bug to me. But I am aware that my personal opinion on the mincing of words has rightfully rather little effect on the way other people run their software projects. (=

Please feel free to submit a pull request if you are a software developer and have some spare free time.

I do not have free time but I have less fun matters to procrastinate. Therefore, I already did, before even seeing your response. :P We'll see how long it takes to finish this, the UI is really not up to the task and I am not quite up to the task of GUI design and implementation.

HermannDppes avatar Jun 15 '19 20:06 HermannDppes

Unfortunately, for me on macOS Mojave 10.14.6 merging #466 resulted in the record menu being partly destroyed. When I build commit ff0b0248, then the record menu looks like this: record-menu-ff0b0248-macOS-10 14 6

When I build commit 8d9b3e32 (the one before #466 was merged), it looks like this: record-menu-8d9b3e32-macOS-10 14 6

jbretsch avatar Oct 18 '19 19:10 jbretsch

@jbretsch you'll habe to update your theme. The changed theme which you can find in the repository contains the required changes already.

basisbit avatar Oct 18 '19 20:10 basisbit

Thank you! That worked. Now the screen looks as intended: record-menu-as-intended

Unfortunately, now another problem becomes apparent. (Maybe two problems.)

  1. I have those Singstar microphones. No matter which channel (1 or 2) I choose in the record menu, the bar below the channel selector always shows the amplitude for channel 1. That is, even if I select channel 2 and tap on the microphone that belongs to channel 1, the bar shows the amplitude (for channel 1). If I select channel 2 and tap on the microphone that belongs to channel 2, the bar shows no activity.
  2. The player assignment is not saved per channel. I select channel 1 and assign player 1. Then I select channel 2 and see player 1 still being assigned (to channel 2). I assign player 2 (to channel 2). Now I select channel 1 and see player 2 assigned to channel 1.

This is not only a display problem. When I start a game, then always a dialog box appears telling me that either player 1 or 2 is not assigned to any microphone.

I can however assign different players to microphones that belong to different devices ("soundcards" in the record menu). But I cannot assigned different players to different channels of the same device.

jbretsch avatar Oct 18 '19 20:10 jbretsch

Mmh. I looked into this issue again. And now I am unable to reproduce the behaviour I observed yesterday and described in my comment above. I have rebuilt everything from scratch. But that I did also yesterday.

Anyway, there does not seem to be any problem now. So please disregard my comment above.

jbretsch avatar Oct 19 '19 08:10 jbretsch

Given that #466 was merged, we should be able to close this issue.

HermannDppes avatar Dec 22 '19 22:12 HermannDppes