Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright

Semitone Spectrogram

Post any examples or modules that you want to share here

Semitone Spectrogram

Postby martinvicanek » Sun Dec 20, 2015 6:51 am

Hi gang,

this is a demo of a semitone spectrogram. It covers 4 octaves, I was happy to see that Ruby can draw 64x48 rectangles fast enough for a sense of motion. However, I am sure it can be done more efficiently.

The DSP part includes a filter bank of 48 4th order bandpass filters followed by envelope followers. There is still some headroom regarding expansions to more octaves as well as further optimizations.

Have fun!
Attachments
semitoneSpectrogram2.png
semitoneSpectrogram2.png (200.4 KiB) Viewed 42782 times
Spectrogram2.fsm
(157.16 KiB) Downloaded 1864 times
Spectrogram.fsm
(115.57 KiB) Downloaded 1815 times
Last edited by martinvicanek on Wed Dec 30, 2015 7:29 pm, edited 1 time in total.
User avatar
martinvicanek
 
Posts: 1328
Joined: Sat Jun 22, 2013 8:28 pm

Re: Semitone Spectrogram

Postby Tronic » Sun Dec 20, 2015 6:56 am

:geek: Mastodontic 8-)
Tronic
 
Posts: 539
Joined: Wed Dec 21, 2011 12:59 pm

Re: Semitone Spectrogram

Postby RJHollins » Sun Dec 20, 2015 9:26 am

Impressive !!!!

Thanks Martinvicanek

8-)
RJHollins
 
Posts: 1571
Joined: Thu Mar 08, 2012 7:58 pm

Re: Semitone Spectrogram

Postby Spogg » Sun Dec 20, 2015 10:12 am

Absolutely fantastic Martin.

Plus, this is just what I needed right now to analyse some samples for pitch for my ongoing Q-50 project :o

How did you know? I was expecting socks :lol:

Merry Christmas

Spogg
User avatar
Spogg
 
Posts: 3358
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England

Re: Semitone Spectrogram

Postby Spogg » Sun Dec 20, 2015 1:32 pm

I rigged this up to find the base pitch of samples and to test with a simple tone.
I've tried quite a few samples and it's SO good (your module!).

This is such a great gift for me so thank you again :D :D :D

Cheers

Spogg
Attachments
Pitch finder 1.0.fsm
(1.31 MiB) Downloaded 1875 times
User avatar
Spogg
 
Posts: 3358
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England

Re: Semitone Spectrogram

Postby tulamide » Mon Dec 28, 2015 9:21 pm

Finally had the time to test your Spectogram (I am so used to the word Sonograph, but it seems that word is nowadays used for those body scanners only?). Martin, that is fantastic. As always I have no clue how you realized that, but it is so impressive. I fed it with a stem file from one of my songs. It was a pad played with two notes, not changing. Your module identified the two notes without any problem. I might be wrong, but it seems that it also shows the strengths of the two notes (I played the higher note quieter than the lower one and the spectogram shows more color for the lower note), but maybe that's just a coincidence.

And congratulations to your Ruby code. If I'm right it's the first time that you post something with a self-made Ruby code and it is beautiful. Well structured, easy to read, makes use of the class methods, etc., very good job.

If you want to reduce the number of inputs (Ruby doesn't care, but maybe you like it clean), you could use a RubyEdit per 12-output module and route the 12 arrays to one Ruby object. They could then again being combined to one Ruby object, so that you only have one input to the main RubyEdit.

Very good job. I'm just a bit afraid. You are already a master in dsp/asm. If you now also become a master in Ruby, what will be left for me to help? ;)
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: Semitone Spectrogram

Postby martinvicanek » Mon Dec 28, 2015 10:27 pm

tulamide wrote:And congratulations to your Ruby code. If I'm right it's the first time that you post something with a self-made Ruby code and it is beautiful. Well structured, easy to read, makes use of the class methods, etc., very good job.
Thanks, tulamide. I try to keep my code tidy so I can understand it the next time I look at it. :mrgreen:
tulamide wrote:If you want to reduce the number of inputs (Ruby doesn't care, but maybe you like it clean), you could use a RubyEdit per 12-output module and route the 12 arrays to one Ruby object. They could then again being combined to one Ruby object, so that you only have one input to the main RubyEdit.
Yes, I have done that already. I'll post an update soon, with extended range and better performance. And some neat preferences, too.
tulamide wrote:If you now also become a master in Ruby, what will be left for me to help? ;)
Don't worry, I might ascend to the Rubyist Club some day if I work hard, but I'll always leave the tricky stuff to you. :twisted:
User avatar
martinvicanek
 
Posts: 1328
Joined: Sat Jun 22, 2013 8:28 pm

Re: Semitone Spectrogram

Postby martinvicanek » Wed Dec 30, 2015 7:20 pm

Updated the first post. Version 2 features 5 octaves and some other enhancements. Uses heterodyning instead of bandpass filters. Comments and suggestions, please.
User avatar
martinvicanek
 
Posts: 1328
Joined: Sat Jun 22, 2013 8:28 pm

Re: Semitone Spectrogram

Postby Tronic » Thu Dec 31, 2015 10:48 am

heterodyning?
you raise my curiosity....
I have read some info in internet....
but some explanation from you is welcome, to better understand how you use it in this case.
Tronic
 
Posts: 539
Joined: Wed Dec 21, 2011 12:59 pm

Re: Semitone Spectrogram

Postby tulamide » Thu Dec 31, 2015 10:55 am

Have read a bit on the internet, too. It seems to me that you would need to do inverse heterodyning to achieve a spectrogram, won't you?
If so, I again bow deep and praise your creativity! (And still have no clue how you do it)
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Next

Return to User Examples

Who is online

Users browsing this forum: No registered users and 32 guests