{"id":13534063,"url":"https://github.com/albertp007/FSound","last_synced_at":"2025-04-01T22:31:15.008Z","repository":{"id":68886777,"uuid":"41739541","full_name":"albertp007/FSound","owner":"albertp007","description":"F# sound processing library","archived":false,"fork":false,"pushed_at":"2022-04-05T03:18:58.000Z","size":58480,"stargazers_count":49,"open_issues_count":0,"forks_count":9,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-11-02T21:31:57.208Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"F#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/albertp007.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2015-09-01T13:14:25.000Z","updated_at":"2024-08-15T03:24:52.000Z","dependencies_parsed_at":"2024-04-11T14:03:36.343Z","dependency_job_id":"fcc31f1d-5362-4399-b5df-b36e111d0780","html_url":"https://github.com/albertp007/FSound","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/albertp007%2FFSound","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/albertp007%2FFSound/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/albertp007%2FFSound/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/albertp007%2FFSound/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/albertp007","download_url":"https://codeload.github.com/albertp007/FSound/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246720502,"owners_count":20822913,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T07:01:25.994Z","updated_at":"2025-04-01T22:31:14.139Z","avatar_url":"https://github.com/albertp007.png","language":"F#","readme":"## Synopsis\r\n\r\nFSound is a library for processing sound using F#\r\n\r\n## Code Example\r\n\r\nYou can run these examples in F# interactive in Visual Studio.  Make sure you \r\nbuild the project first.   Then in Solution Explorer, right click\r\non the FSound project and select \"Send Project Output to F# Interactive\".  This\r\nwill load the FSound project assembly into F# Interactive.  After that, simply\r\ncopy and paste the code over in each of the following code examples.\r\n\r\nHere are some of the things you can do with FSound:\r\n\r\n#### Generate mono wav file\r\n\r\n* Generate a .wav file containing a single channel of sawtooth wave of amplitude 10000, 440Hz, \r\nsampling rate 44100Hz, 1 channel, 16-bit sample (2 bytes) and which lasts for 2 seconds\r\n  \r\n  ```\r\n  open FSound.Signal;;\r\n  open FSound.IO;;\r\n  \r\n  [saw 10000.0 440.0] \r\n  |\u003e List.map (generate 44100.0 2.0) \r\n  |\u003e streamToWav 44100 2 @\"blah.wav\";;\r\n  ```\r\n\r\n#### Generate stereo wav file\r\n\r\n* Generate a .wav file containing a triangular wave in the left channel and white noise on the right channel\r\n\r\n  ```\r\n  open FSound.Signal;;\r\n  open FSound.IO;;\r\n  \r\n  [triangle 10000.0 440.0; whiteNoise 10000.0]\r\n  |\u003e List.map (generate 44100.0 2.0)\r\n  |\u003e streamToWav 44100 2 @\"blah.wav\";;\r\n  ```\r\n  \r\n#### Play a mono signal\r\n\r\n* Play a single channel of triangular wave of amplitude 10000, 440Hz, sampling rate 44100Hz, 1 channel and which lasts for 2 seconds - [**Listen**] (https://cdn.rawgit.com/albertp007/FSound/master/samples/triangle.mp3)\r\n  \r\n  ```\r\n  open FSound.Signal;;\r\n  open FSound.Utilities;;\r\n  \r\n  [triangle 10000.0 440.0] |\u003e playWave 44100.0 2.0;;\r\n  ```\r\n\r\n#### Play different signals in left and right channel\r\n\r\n* Play a triangular wave in the left channel and white noise in the right channel. ('playWave' above is a convenience function which calls the more general 'play' function which plays an arbitrary of channels, to first generate a signal and then play it in a single channel) - [**Listen**] (https://cdn.rawgit.com/albertp007/FSound/master/samples/stereo.mp3)\r\n\r\n  ```\r\n  open FSound.Signal;;\r\n  open FSound.Play;;\r\n  \r\n  [triangle 10000.0 440.0; whiteNoise 10000.0]\r\n  |\u003e List.map (generate 44100.0 2.0)\r\n  |\u003e play 44100 2;;\r\n  ```\r\n\r\n#### ADSR envelope\r\n\r\n* Add an ADSR envelope to the triangular wave above - [**Listen**] (https://cdn.rawgit.com/albertp007/FSound/master/samples/modulateWithAdsr.mp3)\r\n  \r\n  ```\r\n  open FSound.Signal;;\r\n  open FSound.Utilities;;\r\n  \r\n  [modulate (triangle 20000.0 2000.0) (adsr 0.05 1.0 0.05 0.3 0.1 0.05)]\r\n  |\u003e playWave 44100.0 1.0;;\r\n  ```\r\n\r\n####  Delay with ADSR envelope on triangular waveform\r\n\r\n* Add 200ms delay, 50/50 dry/wet and 0.15 feedback gain to the triangular wave with an ADSR envelope above - [**Listen**] (https://cdn.rawgit.com/albertp007/FSound/master/samples/modulateTriangleAdsrDelay.mp3)\r\n\r\n  ```\r\n  open FSound.Signal;;\r\n  open FSound.Filter;;\r\n  open FSound.Utilities;;\r\n  \r\n  [modulate (triangle 20000.0 2000.0) (adsr 0.05 1.0 0.05 0.3 0.1 0.05)\r\n  \u003e\u003e delay 44100.0 2.0 200.0 1.0 0.15 0.5]\r\n  |\u003e playWave 44100.0 1.0;;\r\n  ```\r\n\r\n#### Delay with ADSR envelope on white noise\r\n\r\n* The same as right above, except replace triangular wave with white noise to produce the sound of shuffling something - [**Listen**] (https://cdn.rawgit.com/albertp007/FSound/master/samples/modulateNoiseAdsrDelay.mp3)\r\n\r\n  ```\r\n  open FSound.Signal;;\r\n  open FSound.Filter;;\r\n  open FSound.Utilities;;\r\n  \r\n  [modulate (whiteNoise 20000.0) (adsr 0.05 1.0 0.05 0.3 0.1 0.05)\r\n  \u003e\u003e delay 44100.0 2.0 200.0 1.0 0.15 0.5]\r\n  |\u003e playWave 44100.0 1.0;;\r\n  ```\r\n\r\n#### Smith-Angell resonator\r\n\r\n* Shaping white noise with a Smith-Angell resonator - [**Listen**] (https://cdn.rawgit.com/albertp007/FSound/master/samples/noiseSmithAngell.mp3)\r\n\r\n  ```\r\n  open FSound.Signal;;\r\n  open FSound.Filter;;\r\n  open FSound.Utilities;;\r\n  \r\n  [whiteNoise 50000.0 \u003e\u003e smithAngell 44100.0 440.0 10.0]\r\n  |\u003e playWave 44100.0 2.0;;\r\n  ```\r\n\r\n#### Smith-Angell resonator with an ADSR envelope\r\n\r\n* Shaping white noise first with an ADSR envelope then a Smith-Angell resonator - [**Listen**] (https://cdn.rawgit.com/albertp007/FSound/master/samples/noiseSmithAngellAdsr.mp3)\r\n\r\n  ```\r\n  open FSound.Signal;;\r\n  open FSound.Filter;;\r\n  open FSound.Utilities;;\r\n  \r\n  [modulate (whiteNoise 50000.0) (adsr 0.05 1.0 0.05 0.3 0.1 0.05)\r\n  \u003e\u003e smithAngell 44100.0 880.0 10.0]\r\n  |\u003e playWave 44100.0 2.0;;\r\n  ```\r\n\r\n#### High-pass filter on white noise\r\n\r\n* Generate white noise and pass through a high-pass filter - [**Listen**] (https://cdn.rawgit.com/albertp007/FSound/master/samples/noiseHp.mp3)\r\n\r\n  ```\r\n  open FSound.Signal;;\r\n  open FSound.Filter;;\r\n  open FSound.Utilities;;\r\n  \r\n  [whiteNoise 10000.0 \u003e\u003e hp 44100.0 10000.0]\r\n  |\u003e playWave 44100.0 1.0;;\r\n  ```\r\n  \r\n#### Low-pass filter on white noise with an LFO\r\n\r\n* Modulate amplitude of white noise with an LFO and pass through a low-pass filter - A crude simulation to the sound of waves - [**Listen**] (https://cdn.rawgit.com/albertp007/FSound/master/samples/noiseLfo.mp3)\r\n\r\n  ```\r\n  open FSound.Signal;;\r\n  open FSound.Filter;;\r\n  open FSound.Utilities;;\r\n  \r\n  [modulate (whiteNoise 10000.0) (lfo 0.05 0.0 0.8) \u003e\u003e lp 44100.0 220.0]\r\n  |\u003e playWave 44100.0 50.0;;\r\n  ```\r\n  \r\n#### Plotting frequency response\r\n\r\n* Plot the magnitude response of a biquad low-pass filter with a centre frequency of 1000Hz and Q equal to 1\r\n  To run the following in F# interactive, you need to send the Newtonsoft.Json reference to F# interactive in addition to the FSound project reference\r\n\r\n  ```\r\n  open FSound.Filter;;\r\n  open FSound.Plotly;;\r\n  \r\n  bqlpCoeff 44100.0 1000.0 1.0\r\n  |\u003e plotMagnitude 44100.0 5000.0;;\r\n  ```\r\n\r\n  ![alt text](https://cdn.rawgit.com/albertp007/FSound/master/samples/frequencyResponse.png \"Magnitude response Biquad low-pass filter 1000Hz\")\r\n\r\n#### Vibrato\r\n\r\n* Vibrato on a triangular wave (7.0 ms max delay, 2Hz LFO) - [**Listen**] (https://cdn.rawgit.com/albertp007/FSound/master/samples/triangleVibrato.mp3)\r\n  \r\n  ```\r\n  open FSound.Signal;;\r\n  open FSound.Filter;;\r\n  open FSound.Utilities;;\r\n  [triangle 10000.0 440.0 \u003e\u003e vibrato 44100.0 7.0 2.0]\r\n  |\u003e playWave 44100.0 5.0;;\r\n  ```\r\n\r\n#### Flanging\r\n\r\n* Flanging on saw wave (7.0 ms max delay, 0.15 feedback, 0.5 wet/dry, 0.2Hz LFO) - [**Listen**] (https://cdn.rawgit.com/albertp007/FSound/master/samples/sawFlanger.mp3)\r\n\r\n  ```\r\n  open FSound.Signal;;\r\n  open FSound.Filter;;\r\n  open FSound.Utilities;;\r\n  [saw 10000.0 440.0 \u003e\u003e flanger 44100.0 7.0 0.15 0.5 0.2]\r\n  |\u003e playWave 44100.0 10.0;;\r\n  ```\r\n\r\n#### Flanging on white noise\r\n\r\n* Flanging on white noise - [**Listen**] (https://cdn.rawgit.com/albertp007/FSound/master/samples/noiseFlanger.mp3)\r\n\r\n  ```\r\n  open FSound.Signal;;\r\n  open FSound.Filter;;\r\n  open FSound.Utilities;;\r\n  [whiteNoise 10000.0 \u003e\u003e flanger 44100.0 7.0 0.15 0.5 0.2]\r\n  |\u003e playWave 44100.0 10.0;;\r\n  ```\r\n\r\n#### Chorus\r\n\r\n* Chorus effect (44100Hz sampling frequency, 30ms max delay, 0.4 wet/dry, 1.5Hz LFO) on a square wave with an adsr envelope and delay (The delay params are taken from William Sharkey's Interior Sounds (https://github.com/williamsharkey/William-FSound-Songs#1-interior-sounds---click-to-play) - [**Listen**] (https://cdn.rawgit.com/albertp007/FSound/master/samples/sawChorusAdsrDelay.mp3)\r\n\r\n  ```\r\n  open FSound.Signal;;\r\n  open FSound.Filter;;\r\n  open FSound.Utilities;;\r\n  [modulate (square 10000.0 440.0 \u003e\u003e chorus 44100.0 30.0 0.4 1.5) (adsr 0.05 1.0 0.05 0.3 0.1 0.05) \r\n  \u003e\u003e delay 44100.0 2.0 200.0 1.0 0.9 0.5]\r\n  |\u003e playWave 44100.0 10.0;;\r\n  ```\r\n  \r\n* Chorus effect like the above but with a typo in the sampling frequency in the delay (this typo is beautiful, sort of) - [**Listen**] (https://cdn.rawgit.com/albertp007/FSound/master/samples/typoSawChorusAdsrDelay.mp3)\r\n\r\n  ```\r\n  open FSound.Signal;;\r\n  open FSound.Filter;;\r\n  open FSound.Utilities;;\r\n  [modulate (square 10000.0 440.0 \u003e\u003e chorus 44100.0 30.0 0.4 1.5) (adsr 0.05 1.0 0.05 0.3 0.1 0.05) \r\n  \u003e\u003e delay 4410.0 2.0 200.0 1.0 0.9 0.5]\r\n  |\u003e playWave 44100.0 2.0;;  \r\n  ```\r\n\r\n#### Streaming sample sequences\r\n\r\n* Streaming a sequence of samples to a wav file as the sample is being evaluated.\r\n\r\n  ```\r\n  open FSound.IO;;\r\n  open FSound.Signal;;\r\n  open FSound.Filter;;\r\n  [modulate (square 10000.0 440.0 \u003e\u003e chorus 44100.0 30.0 0.4 1.5) (adsr 0.05 1.0 0.05 0.3 0.1 0.05) \r\n  \u003e\u003e delay 4410.0 2.0 200.0 1.0 0.9 0.5 \r\n  |\u003e generate 44100.0 2.0 ]\r\n  |\u003e streamToWav 44100 2 @\"C:\\Users\\panga\\project\\FSound\\blah.wav\";;\r\n  ```\r\n\r\n#### Karplus-Strong algorithm\r\n\r\n* A crude implementation of the plucked string using Karplus-Strong algorithm.  (Attenuation/Decay cannot be controlled at the moment) - Listen [**Pluck**] (https://cdn.rawgit.com/albertp007/FSound/master/samples/karplusStrong.mp3) [**Vibrato**] (https://cdn.rawgit.com/albertp007/FSound/master/samples/karplusStrongVibrato.mp3) [**Chorus**] (https://cdn.rawgit.com/albertp007/FSound/master/samples/karplusStrongChorus.mp3) [**Flange**] (https://cdn.rawgit.com/albertp007/FSound/master/samples/karplusStrongFlanger.mp3)\r\n\r\n  ```\r\n  open FSound.Filter;;\r\n  open FSound.Utilities;;\r\n  [pluck2LevelRandom 10000.0 44100.0 256.0] |\u003e playWave 44100.0 5.0;;\r\n  // For some interesting combinations with different variations of modulated delay line\r\n  // Note:  When copying to F# interactive, copy and execute line by line, or they will\r\n  // all sound at the same time\r\n  [pluck2LevelRandom 10000.0 44100.0 256.0 \u003e\u003e vibrato 44100.0 7.0 2.0] |\u003e playWave 44100.0 5.0;;\r\n  [pluck2LevelRandom 10000.0 44100.0 256.0 \u003e\u003e chorus 44100.0 30.0 0.5 2.0] |\u003e playWave 44100.0 5.0;;\r\n  [pluck2LevelRandom 10000.0 44100.0 256.0 \u003e\u003e flanger 44100.0 7.0 0.5 0.5 0.2] |\u003e playWave 44100.0 5.0;;\r\n  ```\r\n \r\n#### Arrangement of instruments\r\n\r\n* Arrange a list of generators to be played at particular time offset.  The following plays the C maj7 chord - [**Listen**] (https://cdn.rawgit.com/albertp007/FSound/master/samples/cmajor7.mp3)\r\n\r\n  ```\r\n  open FSound.Signal;;\r\n  open FSound.Utilities;;\r\n  let gen pitch = modulate (triangle 15000.0 pitch) (adsr 0.05 1.0 0.05 0.3 0.1 0.05)\r\n  // natural tuning\r\n  let (c, e, g, b) = (gen 256.0, gen 320.0, gen 384.0, gen 480.0)\r\n  [ arrange [(0.0, c); (0.0, e); (0.0, g); (0.0, b)] ]\r\n  |\u003e playWave 44100.0 1.0;;\r\n  ```\r\n\r\n#### Ping-pong delay\r\n\r\n* Ping pong delay - [**Listen**] (https://cdn.rawgit.com/albertp007/FSound/master/samples/pingpong.mp3)\r\n\r\n  ```\r\n  open FSound.Signal;;\r\n  open FSound.Filter;;\r\n  open FSound.Play;;\r\n  let i p = modulate (triangle 10000.0 p) (adsr 0.05 1.0 0.05 0.3 0.1 0.05)\r\n  multiplex (i 256.0) (i 384.0) \u003e\u003e pingpong 44100.0 2.0 200.0 1.0 0.9 0.5 0\r\n  |\u003e generate 44100.0 15.0 \r\n  |\u003e playStereo 44100 2;;\r\n  ```\r\n\r\n#### Chord progression\r\n\r\n* Chord progression CMaj7 to FMaj7 with ping pong delay - [**Listen**] (https://cdn.rawgit.com/albertp007/FSound/master/samples/progression.mp3)\r\n\r\n  ```\r\n  open FSound.Signal;;\r\n  open FSound.Filter;;\r\n  open FSound.Play;;\r\n  let gen pitch = \r\n    modulate (triangle 15000.0 pitch) (adsr 0.05 1.0 0.05 0.3 0.1 0.05)\r\n  let (c, d, e, f, g, a, b) = \r\n    (gen 256.0, gen 288.0, gen 320.0, gen 341.33, gen 384.0, gen 440.0, \r\n     gen 480.0) \r\n  \r\n  multiplex (arrange [ (0.0, c); (0.0, b); (4.0, f); (4.0, a) ]) \r\n    (arrange [ (0.0, e); (0.0, g); (4.0, c); (4.0, e) ])\r\n  \u003e\u003e pingpong 44100.0 2.0 200.0 1.0 0.9 0.5 0\r\n  |\u003e generate 44100.0 15.0\r\n  |\u003e playStereo 44100 2;;\r\n  ```\r\n\r\n#### Telephone ringing tone\r\n\r\n* Ringing tone (based on Andy Farnell's book \"Designing Sound\") - [**Listen**] (https://cdn.rawgit.com/albertp007/FSound/master/samples/ringing.mp3)\r\n\r\n  ```\r\n  open FSound.Signal;;\r\n  open FSound.Filter;;\r\n  open FSound.Utilities;;\r\n  let level = 10000.0;;\r\n  let fs = 44100.0;;\r\n  let tone() = sum [osc fs level 440.0; osc fs level 480.0];;\r\n  let telephoneLine() =\r\n    clipper level \r\n    \u003e\u003e bp fs 2000.0 12.0\r\n    \u003e\u003e split ((*) 0.5 \u003e\u003e bp fs 400.0 3.0) \r\n         (clipper (0.4*level) \u003e\u003e (*) 0.15)\r\n    \u003e\u003e combine\r\n    \u003e\u003e hp fs 90.0;;\r\n  [beep (tone() \u003e\u003e telephoneLine()) 2.0 4.0] |\u003e playWave 44100.0 20.0;;\r\n  ```\r\n\r\n#### Schroeder reverberation\r\n\r\n* Schroeder reverb - [**Listen**] (https://cdn.rawgit.com/albertp007/FSound/master/samples/schroeder.mp3)\r\n\r\n  ```\r\n  open FSound.Signal;;\r\n  open FSound.Filter;;\r\n  open FSound.Play;;\r\n  let signal = triangle 10000.0 440.0;;\r\n  let envelope = adsr 0.05 1.0 0.05 0.3 0.1 0.05;;\r\n  let inst = signal |\u003e modulateBy envelope;;\r\n  let reverb = schroeder 44100.0 1.0 (101.0, 143.0, 165.0, 177.0)\r\n                 (0.4, 0.37, 0.3333, 0.3);;\r\n  inst \u003e\u003e reverb |\u003e generate 44100.0 2.0 |\u003e playStereo 44100 2;;\r\n  ```\r\n\r\n#### Ring modulation\r\n\r\n* Ring modulator - [**Listen**] (https://cdn.rawgit.com/albertp007/FSound/master/samples/ringMod.mp3)\r\n\r\n  ```\r\n  open FSound.Signal;;\r\n  open FSound.Play;;\r\n  open FSound.Utilities;;\r\n  [ triangle 10000.0 320.0 |\u003e ring 1.0 440.0]\r\n  |\u003e playWave 44100.0 1.0;;\r\n  ```\r\n\r\n#### FM Synthesis\r\n\r\n* FM synthesis - [**Listen**] (https://cdn.rawgit.com/albertp007/FSound/master/samples/fm.mp3)\r\n\r\n  ```\r\n  open FSound.Signal;;\r\n  open FSound.Utilities;;\r\n\r\n  [fm (Const 10000.0) 256.0 66.0 1.5 ]\r\n  |\u003e playWave 44100.0 1.0;;\r\n  ```\r\n\r\n* FM Bass - an attempt - [**Listen**] (https://cdn.rawgit.com/albertp007/FSound/master/samples/fmBass.mp3)\r\n\r\n  ```\r\n  open FSound.Signal;;\r\n  open FSound.Utilities;;\r\n  [fm (Const 20000.0) 128.0 66.0 2.0 |\u003e modulate (adsr 0.05 1.0 0.2 0.1 0.0 0.0)]\r\n  |\u003e playWave 44100.0 1.0;;\r\n  ```\r\n\r\n* This damn balloon... - [**Listen**] (https://cdn.rawgit.com/albertp007/FSound/master/samples/blowingEverHarder.mp3)\r\n  \r\n  ```\r\n  open FSound.Signal;;\r\n  open FSound.Utilities;;\r\n  let modSinusoid1 (modA : Mod) f fm depth = \r\n    let pi = System.Math.PI\r\n    fun t -\u003e \r\n      let a = modA.GetValue t\r\n      a * sin (2.0*pi*(f + depth*sin(2.0*pi*fm*t))*t);;\r\n  [modSinusoid1 (Const 1000.0) 256.0 0.5 20.0] \r\n  |\u003e playWave 44100.0 14.5;;\r\n  ```\r\n\r\n#### Chowning's FM instruments\r\n\r\n* Simulation of brass with Chowning's FM Synthesis - [**Listen**] (https://cdn.rawgit.com/albertp007/FSound/master/samples/chowningBrass.mp3)\r\n\r\n  ```\r\n  open FSound.Signal;;\r\n  open FSound.Utilities;;\r\n  let dur = 1.0;;\r\n  let mcRatio = 1.0;;\r\n  let depth = 5.0;;\r\n  let depthEnvelope = adsrX 0.2 1.0 0.2 0.6 0.5 0.1 dur;;\r\n  [chowning 20000.0 512.0 mcRatio depth depthEnvelope] \r\n  |\u003e playWave 44100.0 dur;;\r\n  ```\r\n\r\n* Bell - [**Listen**] (https://cdn.rawgit.com/albertp007/FSound/master/samples/chowningBell.mp3)\r\n\r\n  ```\r\n  open FSound.Signal;;\r\n  open FSound.Utilities;;\r\n  let mcRatio = 1.4;;\r\n  let depth = 10.0;;\r\n  let env = fadeExp 1.0;;\r\n  [chowning 10000.0 300.0 mcRatio depth env |\u003e modulateBy env]\r\n  |\u003e playWave 44100.0 15.0;;\r\n  ```\r\n\r\n* Gong - lower the frequency a bit  - [**Listen**] (https://cdn.rawgit.com/albertp007/FSound/master/samples/chowningGong.mp3)\r\n\r\n  ```\r\n  open FSound.Signal;;\r\n  open FSound.Utilities;;\r\n  let mcRatio = 1.4;;\r\n  let depth = 10.0;;\r\n  let env = fadeExp 1.0;;\r\n  [chowning 10000.0 100.0 mcRatio depth env |\u003e modulateBy env]\r\n  |\u003e playWave 44100.0 15.0;;\r\n  ```\r\n\r\n#### Representing relationships in Western Tonal Music\r\n* Chords - Construction of chords from intervals\r\n\r\n  ```\r\n  open FSound.Tonal;;\r\n  addIntervalToNote (Sh A) (Aug Third);;\r\n  makeChord (Major (N C));; // C Major\r\n  makeChord (Major (Sh G));; // G-sharp Major\r\n  makeChord (Neo6 (N C));; // C neopolitan 6th\r\n  ```\r\n\r\n\r\n## Motivation\r\n\r\nThis project arises purely out of a personal interest in learning the F#\r\nprogramming language and applying it to a domain I have always found fascinating - Sound\r\n\r\n\r\n## Installation\r\n\r\nSimply download the project and load it in visual studio 2015.\r\n\r\nIf your version of Visual Studio does not have F#,  you may \r\ninstall the free Visual Studio 2015 Community Edition. \r\nThe Visual F# Tools are installed automatically when you first \r\ncreate or open an F# project. See: http://fsharp.org/use/windows/\r\n\r\nThis project requires you to install a couple of dependent packages. \r\n\r\nTo do this with Nu-Get in VS:\r\n\r\n1. Right click References in Solution Explorer \r\n2. Click Manage Nu-Get packages\r\n3. Click Restore when you see \"Some NuGet packages are missing from this solution. Click to restore from your online package sources\"\r\n\r\nYou should be all set.  Simply rebuild the project.  Feel free to send an email to albert.pang@me.com if you run into any problems.\r\n\r\n\r\n## Tests\r\n\r\nSignalTest.fsx is the only test script for now.  Load it into F# interactive:\r\n```\r\nC:\\Users\\panga\\project\\fsharp\\FSound\u003efsi --load:SignalTest.fsx\r\n\r\nMicrosoft (R) F# Interactive version 14.0.23020.0\r\nCopyright (c) Microsoft Corporation. All Rights Reserved.\r\n\r\nFor help type #help;;\r\n\r\n[Loading C:\\Users\\panga\\project\\fsharp\\FSound\\SignalTest.fsx]\r\n\r\nnamespace FSI_0002\r\n  val main : unit -\u003e bool\r\n\r\n\u003e SignalTest.main();;\r\nval it : bool = true\r\n\r\n\u003e exit 0;;\r\n\r\nC:\\Users\\panga\\project\\fsharp\\FSound\u003edir *.wav\r\n Volume in drive C has no label.\r\n Directory of C:\\Users\\panga\\project\\fsharp\\FSound\r\n\r\n01/09/15  07:17 pm           176,446 saw-440.wav\r\n01/09/15  07:17 pm           176,446 sinusoid-440.wav\r\n01/09/15  07:17 pm           176,446 square-440.wav\r\n01/09/15  07:17 pm           176,446 triangle-440.wav\r\n01/09/15  07:17 pm           882,046 wave.wav\r\n01/09/15  07:17 pm           176,446 whitenoise.wav\r\n               6 File(s)      1,764,276 bytes\r\n               0 Dir(s)  30,879,870,976 bytes free\r\n```\r\n## Contributors\r\nAlbert Pang (albert.pang@me.com)\r\n\r\n## Showcase\r\nWilliam Sharkey's compositions (https://github.com/williamsharkey/William-FSound-Songs)\r\n\r\n## License\r\n\r\nReleased under GPL v3.0 licence\r\n","funding_links":[],"categories":["Libraries"],"sub_categories":["F#"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falbertp007%2FFSound","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falbertp007%2FFSound","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falbertp007%2FFSound/lists"}