Author |
Topic: HQSOUND module released (Read 1236 times) |
|
rtr2
Guest
|
 |
HQSOUND module released
« Thread started on: Jun 10th, 2015, 10:29am » |
|
I have released version 1.0 of the HQSOUND library module, which patches BB4W in memory so that the SOUND and ENVELOPE statements output 'CD quality' sound (see the related thread and the REMarks in the program). The module may be downloaded from the Files section of the Yahoo! group here (members only):
https://groups.yahoo.com/neo/groups/bb4w/files/Libraries/
If you are not a member of the Yahoo! group you can get it from this direct download link.
I have quite deliberately not added any 'fancy' features, such as being able to change the stereo mix or redefine the waveforms, but I have hopefully commented the code sufficiently well that anybody who wants to enhance its capabilities can do so themselves.
Richard.
|
« Last Edit: Jun 12th, 2015, 1:20pm by rtr2 » |
Logged
|
|
|
|
dfeugey
Guest
|
 |
Re: HQSOUND module released
« Reply #1 on: Jun 11th, 2015, 09:09am » |
|
Ah, very cool. Exactly what I need
|
|
Logged
|
|
|
|
rtr2
Guest
|
 |
Re: HQSOUND module released
« Reply #2 on: Jun 21st, 2015, 06:20am » |
|
I would appreciate some feedback on this proposal for changes to HQSOUND:
Delete the existing procedure PROC_hqinit and replace it with a function FN_hqinit.
FN_hqinit would return either zero or a pointer to the stereo mix QWORD.
If zero is returned, it means that the HQSOUND patch was installed earlier in the IDE session so changes to the stereo mix are not possible (this could never happen in a BB4W compiled EXE).
If a non-zero value is returned it means that changes to the stereo mix are possible by writing the eight 16-bit gain values (four left plus four right) to the memory pointed to by the returned address. This would support dynamic pan effects. Richard.
|
|
Logged
|
|
|
|
dfeugey
Guest
|
 |
Re: HQSOUND module released
« Reply #3 on: Jun 21st, 2015, 10:08am » |
|
Seems to be clear and useful... for me
|
|
Logged
|
|
|
|
DDRM
Administrator
member is offline


Gender: 
Posts: 321
|
 |
Re: HQSOUND module released
« Reply #4 on: Jun 21st, 2015, 9:28pm » |
|
Hi Richard,
That would be great - I've been playing along similar lines, but I don't understand it well enough to make it work! I can change it to give any INITIAL setting for the stereo channels, but I'm struggling to make it possible to come back and change it later.
I tried splitting out the original "setting up" elements, and a separate "write the wave table" section, but I'm struggling to pass the required info between them when calling the latter on subsequent occasions. I suspect I'm missing something that is local, and not preserving it properly - or maybe the address of a routine changes between calls?
Best wishes,
D
|
|
Logged
|
|
|
|
rtr2
Guest
|
 |
Re: HQSOUND module released
« Reply #5 on: Jun 22nd, 2015, 05:55am » |
|
on Jun 21st, 2015, 9:28pm, DDRM wrote:I tried splitting out the original "setting up" elements, and a separate "write the wave table" section |
|
My proposal does not support re-writing the wave table. To make that possible would require returning two values rather than one, so instead of a function FN_hqinit it would need (for example) to be a procedure with two RETURNed parameters.
If anybody thinks that re-writing the wave table is important then shout now before I make the suggested revisions.
Richard.
|
« Last Edit: Jun 22nd, 2015, 05:59am by rtr2 » |
Logged
|
|
|
|
DDRM
Administrator
member is offline


Gender: 
Posts: 321
|
 |
Re: HQSOUND module released
« Reply #6 on: Jun 22nd, 2015, 08:48am » |
|
Hi Richard,
My plan to split things that way probably demonstrates my lack of understanding: I suspected that the wavetable would need to be updated to move the stereo position, since I couldn't see how to tease out the two elements. If one can simply rewrite that small block, that's obviously an easier and quicker solution, and is fine with me.
Best wishes,
D
|
|
Logged
|
|
|
|
rtr2
Guest
|
 |
Re: HQSOUND module released
« Reply #7 on: Jun 22nd, 2015, 2:36pm » |
|
on Jun 22nd, 2015, 08:48am, DDRM wrote:I couldn't see how to tease out the two elements. |
|
They're entirely independent. The stereo mix (pan position) is simply a function of the relative left and right amplitudes whereas the wave table determines the quality of the sound (e.g. what harmonics are present).
Richard.
|
|
Logged
|
|
|
|
rtr2
Guest
|
 |
Re: HQSOUND module released
« Reply #8 on: Jun 24th, 2015, 04:12am » |
|
on Jun 21st, 2015, 06:20am, g4bau wrote:I would appreciate some feedback on this proposal for changes to HQSOUND |
|
I conclude that there is insufficient interest to warrant any further effort.
Richard.
|
|
Logged
|
|
|
|
rtr2
Guest
|
 |
Re: HQSOUND module released
« Reply #9 on: Jun 24th, 2015, 12:54pm » |
|
on Jun 24th, 2015, 04:12am, g4bau wrote:I conclude that there is insufficient interest to warrant any further effort. |
|
To avoid any misunderstanding can I clarify that I already have fully-developed and tested versions of the HQSOUND library which support returning pointers to the stereo mix and wave tables.
Richard.
|
|
Logged
|
|
|
|
afarlie
New Member
member is offline


Posts: 18
|
 |
Re: HQSOUND module released
« Reply #10 on: Sep 8th, 2015, 8:27pm » |
|
on Jun 10th, 2015, 10:29am, rtr2 wrote:I have released version 1.0 of the HQSOUND library module, which patches BB4W in memory so that the SOUND and ENVELOPE statements output 'CD quality' sound (see the related thread and the REMarks in the program). The module may be downloaded from the Files section of the Yahoo! group here (members only):
https://groups.yahoo.com/neo/groups/bb4w/files/Libraries/
Richard. |
|
Which version of BB4W was this intended for? AS I understand somethings changed in V6?
|
|
Logged
|
|
|
|
afarlie
New Member
member is offline


Posts: 18
|
 |
Re: HQSOUND module released
« Reply #11 on: Sep 8th, 2015, 9:48pm » |
|
Sounds very nice. (Not that I can understand the code).
Were there long term plans to add more channels like on RISC OS based systems. ( which also have per channel wavetables)? I won't be disappointed if this isn't planned.
I will also note that somewhere in the BB4W notes is some assembler code for calling sound from assembler... Now if someone can figure out how to tweak that code so it can add it into the BB4WFORTH you wrote a while ago (Aside: Not sure if this needs patching for BB4W6.0a) then with BB4WFORTH+HQSOUND means a Windows based AMPLE is a lot more plausible again. Any takers?
IIRC the original Music 500 used 7bit samples, Hmmm....
|
|
Logged
|
|
|
|
|