06 June 2022, 18:02 | #1 |
Registered User
Join Date: May 2017
Location: AmigaLand
Posts: 459
|
How works Sound Spectrum Analyzer ?
Hi,
Can someone give me the principle of the Spectrum Analyzer we could see in Protracker or some demos ? I'm zero at sound so a simple explanation would be nice |
06 June 2022, 18:53 | #2 |
Registered User
Join Date: Feb 2018
Location: Poland
Posts: 352
|
Bars are triggered by the notes replayed in pattern or by keyboard. Their heights are based on notes volumes which are added to the current bar heigh's value. It is not a real spectrum analyzer. Quadra Composer has more interesting one.
|
06 June 2022, 19:02 | #3 |
Registered User
Join Date: May 2017
Location: AmigaLand
Posts: 459
|
Thanks for infos, no9
|
07 June 2022, 17:50 | #4 |
Registered User
Join Date: May 2005
Location: Atherstone / UK
Age: 49
Posts: 161
|
I presume the OP is talking about the spectrum analyser on the top right, rather than the bars above each channel? Doesn't that display actually respond to the frequencies being played? I'd guess that it doesn't actually analyse the sample data being played, rather it takes its cue from the pitch that's triggered as part of the pattern, though I could be very wrong here.
|
07 June 2022, 18:31 | #5 |
Registered User
Join Date: Feb 2018
Location: Poland
Posts: 352
|
Yes, the bars represent notes from C1 on the far left to B3 on the far right of the Spectrum Analyzer. Which also implies their frequencies (sample rates) at the same time.
|
07 June 2022, 19:23 | #6 | |
Registered User
Join Date: Sep 2019
Location: Finland
Posts: 361
|
Quote:
The actual audible frequencies are created based on this playback frequency and the form of the wave being played. From this point of view the Spectrum Analyzer in the picture does not actually display the frequency spectrum |
|
09 June 2022, 11:47 | #7 |
Registered User
Join Date: Jan 2017
Location: London, UK
Posts: 433
|
Ahhhh!!! I always wondered how Protractor faked the spectrum analyser. Very clever...
I have tried to write a Fixed Point FFT algorithm, but could never get it fast enough to run on a 68000 (especially after the windowing passes), and now even cheap microcontrollers have FPUs and run at hundreds of MHz, there isn't much point |
09 June 2022, 14:34 | #8 |
Registered User
Join Date: Feb 2018
Location: Poland
Posts: 352
|
Look there at the Quadra Composer's Spectrum Analyser.
[ Show youtube player ] Last edited by no9; 09 June 2022 at 17:48. |
09 June 2022, 15:32 | #9 |
Registered User
Join Date: Apr 2015
Location: Spain
Posts: 511
|
I have never seen much sense about the spectrum analyser in protracker, because in order to visually understand what you see in the spectrum all the notes should be sampled at the same frequency, which is not very common in amiga mods.
It looks nice but it is not very effective. Just an opinion |
09 June 2022, 19:37 | #10 | |
Registered User
Join Date: Sep 2019
Location: Finland
Posts: 361
|
Quote:
In HippoPlayer (v2.52) there is a spectrum analyzer scope that runs about 5-10 frames per second on A500. Admittedly it is not super smooth but it's quite ok I think. It is a port of an old C-algorithm. Technical details: Mix and resample four channels into input data, apply Hanning window, calculate 128-point fixed point FFT, calculate decibel representation, plot data. |
|
16 June 2022, 13:23 | #11 |
OctaMED Music Composer
Join Date: Jan 2009
Location: Venice - Italy
Age: 49
Posts: 666
|
I was looking for a way retrieve actual sample address being played and landed here. From the HW manual it seems like audio registers are write only so it shouldn't be possible but maybe there is some trick?
|
16 June 2022, 17:20 | #12 |
Registered User
Join Date: Jun 2016
Location: europe
Posts: 1,039
|
You have to access player structures, it typically maintains a copy of sample ptrs, periods, volumes, etc. for all the (active) channels. So you take sample ptrs and then you calculate where exactly within a sample you are. This can get tricky due to sample looping, replaying the same sample with a different note/period, changing volume, etc. You also have to maintain frame counters for each channel you so know for how long it's been played.
I did that with the noisetracker player, in a music disc we released back in the 90's. So if you are using protracker it could be done in a similar way *or* if you switch to P61 player that has the oscilloscope already built-in you could just customize it (haven't used it myself, I only needed a pure player at some point). IIRC you are primarily using octamed, so in that case you'll have to look into its source code but the principles are the same. |
16 June 2022, 17:51 | #13 |
Puttymoon inhabitant
|
It is indeed cool, but what does it tell me?
|
16 June 2022, 18:05 | #14 |
Registered User
Join Date: Sep 2009
Location: Norway
Posts: 1,710
|
ProTracker is not a professional music production tool. The basic (and improper) visualizers are there mostly to entertain you and make the tracker more interesting to use.
Both the spectrum analyzer and the VU-meters are fake. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
More than 4 sound channels - how it works? | Mrs Beanbag | Coders. General | 210 | 03 March 2024 10:16 |
Help with Blue Ribbon Sound Works One Stop Music Shop | Tavis | support.Apps | 16 | 07 May 2022 19:13 |
Advanced Amiga Analyzer 2.0 | Nibbler | support.Hardware | 2 | 14 July 2016 13:30 |
25 ZX Spectrum Games That Sound Like Seventies o Movies | s2325 | Retrogaming General Discussion | 1 | 29 July 2011 19:24 |
Logic Analyzer ??????? | Dimlow | support.Hardware | 7 | 25 September 2008 17:29 |
|
|