electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Articles  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links  |  Store
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
Live streaming at radio.electro-music.com

  host / artist show at your time
  Jez Adventures in Sound
Please visit the chat
 Forum index » Instruments and Equipment » WREN
HrastOsc
Post new topic   Reply to topic
Page 1 of 1 [13 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
HrastProgrammer



Joined: Oct 16, 2008
Posts: 228
Location: CPU
Audio files: 52

PostPosted: Mon Mar 31, 2014 3:06 am    Post subject: HrastOsc Reply with quote  Mark this post and the followings unread

OK, I decided to go with PolyBLEP because DPW doesn't work very well with FM/PM. Attached are spectrum screenshots of the regular saw oscillator and HrastOsc, both at 440Hz (WREN is running at 44.1kHz samplerate) Very Happy

It will be a combined saw/pulse/ramp oscillator. Bandlimiting is configurable so you can achieve even less aliasing at the cost of loosing some brightness.

I have yet to correct a few things and then I'll send you the source ...


SawOsc_440.png
 Description:
 Filesize:  29.29 KB
 Viewed:  19 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

SawOsc_440.png



HrastOsc_440.png
 Description:
 Filesize:  24.74 KB
 Viewed:  19 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

HrastOsc_440.png



_________________
http://www.hrastprogrammer.com/hrastwerk/
http://hrastprogrammer.bandcamp.com/
Back to top
View user's profile Send private message Visit poster's website
Blue Hell
Site Admin


Joined: Apr 03, 2004
Posts: 20685
Location: The Netherlands, Enschede
Audio files: 156
G2 patch files: 318

PostPosted: Mon Mar 31, 2014 5:41 am    Post subject: Reply with quote  Mark this post and the followings unread

Looks like you broke the mirror Shocked Laughing

What do you use to make such nice spectrum plots?

_________________
Jan
Back to top
View user's profile Send private message Visit poster's website
HrastProgrammer



Joined: Oct 16, 2008
Posts: 228
Location: CPU
Audio files: 52

PostPosted: Mon Mar 31, 2014 6:17 am    Post subject: Reply with quote  Mark this post and the followings unread

Visual Analyzer

http://www.sillanumsoft.org/

Indispensable tool when working on software like this, I used it all the time while developing Tranzistow ...

_________________
http://www.hrastprogrammer.com/hrastwerk/
http://hrastprogrammer.bandcamp.com/
Back to top
View user's profile Send private message Visit poster's website
HrastProgrammer



Joined: Oct 16, 2008
Posts: 228
Location: CPU
Audio files: 52

PostPosted: Mon Mar 31, 2014 10:13 am    Post subject: Reply with quote  Mark this post and the followings unread

OK, attached is the oscillator source. I had to modify FrmStore (THrastOsc module layout) and FrmMain (module creation, just look for BOHM/EOHM tags = Begin/End of Hrast's Modifications, it will work in the absence of the version control).

Oscillator parameters:

Freq ... Frequency of the oscillator

Morph ... Morphing between saw and pulse waveform

PW ... Pulse width (doesn't affect saw waveform e.g. when Morph=0)

Shape ... Internal oscillator waveshaping, for saw waveform acts like lowpass filter (more or less), for pulse waveform morphs between pulse and ramp/triangle

Note: Some level readjustment is usually needed when playing with Shape

FM Input + Amount ... Frequency modulation input (exponential)

PM Input + Amount ... Phase modulation input (linear, that's what Yamaha calls "Frequency Modulation")

PWM Input + Amount ... Pulse width modulation input

B-Limit ... Oscillator bandlimiting (0 = Off, 1 = Normal, 2..4 = High, and everything in between)

Level ... Oscillator output level

Sync Input ... Resets oscillator phase to zero on transition from less-or-equal 0 to greather-than 0

Normal/Vintage Button ... The oscillator waveform looks, well, more "vintage" when activated

Mute Button ... Mutes the output

BTW #1, I am an old-school Pascal programmer and don't like unnecessary blanks around operators and ; before end etc. Wink

BTW #2, you have the following row twice in DPR:

Application.CreateForm(TFormWaveDeviceSelect, FormWaveDeviceSelect);

BTW #3, in the DPROJ file there is a reference to an icon outside the project directory:

<Icon_MainIcon>..\_logo\wren_02\wren.ico</Icon_MainIcon>


HrastOsc.zip
 Description:

Download
 Filename:  HrastOsc.zip
 Filesize:  98.4 KB
 Downloaded:  36 Time(s)


_________________
http://www.hrastprogrammer.com/hrastwerk/
http://hrastprogrammer.bandcamp.com/
Back to top
View user's profile Send private message Visit poster's website
HrastProgrammer



Joined: Oct 16, 2008
Posts: 228
Location: CPU
Audio files: 52

PostPosted: Mon Mar 31, 2014 10:36 am    Post subject: Reply with quote  Mark this post and the followings unread

Just fixed a small error and reuploaded the attachment ...
_________________
http://www.hrastprogrammer.com/hrastwerk/
http://hrastprogrammer.bandcamp.com/
Back to top
View user's profile Send private message Visit poster's website
Blue Hell
Site Admin


Joined: Apr 03, 2004
Posts: 20685
Location: The Netherlands, Enschede
Audio files: 156
G2 patch files: 318

PostPosted: Mon Mar 31, 2014 11:34 am    Post subject: Reply with quote  Mark this post and the followings unread

Wow, thanks!

Didn't listen yet, need to eat and then do some tax stuff first Confused ... but did get the code in, and did see it executes pretty efficient indeed!

Old style indeed Laughing well I will not touch your HrastUnit.

I did modify the module layout a bit to make it have the same size title bar as all other modules .. so things had to be shifted a bit, and may shift a bit more later on.

And thanks for your remarks .. yes Delphi fucks up the dpr from time to time, and I had not looked in while. Will get the icon into the project folder too.

Code:

        // BOHM
        4000 .. 4999 : Result := HrastUnit.CreateModule( aType, aParent, aName, anInputCount);
        // EOHM


You seem to have plans? Shocked

_________________
Jan
Back to top
View user's profile Send private message Visit poster's website
Blue Hell
Site Admin


Joined: Apr 03, 2004
Posts: 20685
Location: The Netherlands, Enschede
Audio files: 156
G2 patch files: 318

PostPosted: Mon Mar 31, 2014 11:41 am    Post subject: Reply with quote  Mark this post and the followings unread

Oh .. a mistake .. will need to check what file I got.
_________________
Jan
Back to top
View user's profile Send private message Visit poster's website
Blue Hell
Site Admin


Joined: Apr 03, 2004
Posts: 20685
Location: The Netherlands, Enschede
Audio files: 156
G2 patch files: 318

PostPosted: Mon Mar 31, 2014 4:39 pm    Post subject: Reply with quote  Mark this post and the followings unread

Confused

Tax site was a bit overloaded ... managed to get the stuff in in about 40 minutes before the deadline. after two hours of timed out sessions and hundreds of page reloads and error 3630 stuff ... after that we had some server trouble here as well ...

more fun tomorrow I hope Wink

_________________
Jan
Back to top
View user's profile Send private message Visit poster's website
HrastProgrammer



Joined: Oct 16, 2008
Posts: 228
Location: CPU
Audio files: 52

PostPosted: Mon Mar 31, 2014 9:08 pm    Post subject: Reply with quote  Mark this post and the followings unread

Blue Hell wrote:
Old style indeed Laughing well I will not touch your HrastUnit.


You can reformat this unit according to your style if needed, just wait that all bugs are cleared out.

Quote:
And thanks for your remarks .. yes Delphi fucks up the dpr from time to time


Yes. I am still developing in Delphi 7 when possible because everything after that added more and more various crap of questionable usability + more and more bugs.

There is even more junk in DPROJ:

Code:

        <DCCReference>
            <Form>,
  scala in &apos;scala.pas&apos;,
  Rationals in &apos;Rationals.pas&apos;;

{$R *.res</Form>
        </DCCReference>
        <DCCReference>


Quote:
You seem to have plans? Shocked


I could make some more modules in the future but I certainly don't need 1000 module IDs Wink And you can assign different range if you think it is appropriate ...

_________________
http://www.hrastprogrammer.com/hrastwerk/
http://hrastprogrammer.bandcamp.com/
Back to top
View user's profile Send private message Visit poster's website
HrastProgrammer



Joined: Oct 16, 2008
Posts: 228
Location: CPU
Audio files: 52

PostPosted: Mon Mar 31, 2014 10:31 pm    Post subject: Reply with quote  Mark this post and the followings unread

I corrected a few things in regard to "vintage" mode - updated source is reattached.

Please, look at how I implemented UnitsToFrequency conversion for HrastOsc. Your implementation is executing Power(2,Something) for each oscillator/LFO/SVF/etc. and for each sample - this is very CPU consuming, especially when working at 96kHz (which is, I suppose, the target sample rate for WREN because it is clearly inspired by Nord Modular). My implementation uses interpolated lookup table and maybe you can consider to use the similar approach in your UnitsToFrequency function (and the other functions which use Power). The same with Sin, SinCos, etc.

BTW, I noticed a quirk with knobs ... When you set knob Value property to zero it reverts to 0.5 after reloading the form/project. Didn't have time to look into knobs sources so I set Value properties for all knobs on the module to 1e-9 for now.

_________________
http://www.hrastprogrammer.com/hrastwerk/
http://hrastprogrammer.bandcamp.com/
Back to top
View user's profile Send private message Visit poster's website
Blue Hell
Site Admin


Joined: Apr 03, 2004
Posts: 20685
Location: The Netherlands, Enschede
Audio files: 156
G2 patch files: 318

PostPosted: Tue Apr 01, 2014 2:35 am    Post subject: Reply with quote  Mark this post and the followings unread

Funny .. I actually had lookup tables and then tried to use the functions directly instead and they were faster ... so I got rid of the tables. Will look at it again, the profiling I used at the time was no good.

The knobs thingie you mention is something with defaults being different from what is set in constructor .. the fix will be public in the next release (it got irritating on the 6 x 6 mixer). There are some more issues with knobs and values ... but then again there are more issues all over the place ... I only have so much time Crying or Very sad

_________________
Jan
Back to top
View user's profile Send private message Visit poster's website
Blue Hell
Site Admin


Joined: Apr 03, 2004
Posts: 20685
Location: The Netherlands, Enschede
Audio files: 156
G2 patch files: 318

PostPosted: Tue Apr 01, 2014 12:14 pm    Post subject: Reply with quote  Mark this post and the followings unread

Getting some nice sounds from this now Cool
_________________
Jan
Back to top
View user's profile Send private message Visit poster's website
Blue Hell
Site Admin


Joined: Apr 03, 2004
Posts: 20685
Location: The Netherlands, Enschede
Audio files: 156
G2 patch files: 318

PostPosted: Tue Apr 01, 2014 1:45 pm    Post subject: Reply with quote  Mark this post and the followings unread

I've published a new version having the oscillator in, and some other stuff done as well.
_________________
Jan
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic
Page 1 of 1 [13 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » Instruments and Equipment » WREN
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
e-m mkii

Please support our site. If you click through and buy from
our affiliate partners, we earn a small commission.


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use