Skip to content

Instantly share code, notes, and snippets.

View nischalshrestha's full-sized avatar
🔨

Nischal Shrestha nischalshrestha

🔨
View GitHub Profile
@nischalshrestha
nischalshrestha / shepard_tone.rb
Last active November 7, 2023 00:40
Shepard Tone
# Shepard Tone
start_amp, end_amp = 0, 1
with_fx :reverb, room: 0.8, mix: 0.8 do
with_fx :lpf, cutoff: 100 do
live_loop :shephard do
high = synth :saw, amp: start_amp, amp_slide: 20, notes: [:c5],
note_slide: 30, release: 30
control high, notes: [:c7], amp: end_amp
@nischalshrestha
nischalshrestha / open_eye_signal.rb
Last active October 24, 2023 21:22
One Eye Signal cover
# Open Eye Signal cover
# Drum sample pack: https://thekount.sellfy.store/p/kount-drums-volume-4/
kicks = "/Users/nischal/Music/Kount Drums Volume 4/One Shot/Kicks"
hh = "/Users/nischal/Music/Kount Drums Volume 4/One Shot/Hihats_Cymbals"
snares = "/Users/nischal/Music/Kount Drums Volume 4/One Shot/Snares"
percs = "/Users/nischal/Music/Kount Drums Volume 4/One Shot/Percussion"
textures = "/Users/nischal/Music/Kount Drums Volume 4/Textures"
# opening distant sounds
google-cloud-bigquery==1.8.0
pandas==0.25.1
@nischalshrestha
nischalshrestha / split_base_pipe_naive.R
Last active July 10, 2023 23:37
Meta explorations in R
library(tidyverse)
string_code <-
"
diamonds |>
select(carat, cut, color, clarity, price) |>
group_by(color) |>
summarise(n = n(), price = mean(price))
"
@nischalshrestha
nischalshrestha / hopeful.rb
Last active March 19, 2023 05:25
Sonic Pi Jam
use_bpm 120
# You will need Kount Drums Volume 4 sample 😬
# get it here: https://thekount.sellfy.store/p/kount-drums-volume-4/
cymbols = "/Users/nischal/Music/Kount Drums Volume 4/One Shot/Highhats and Cymbals"
snares = "/Users/nischal/Music/Kount Drums Volume 4/One Shot/Snares"
note_value = 0.5 # eighth notes
@nischalshrestha
nischalshrestha / auto_dubstep.rb
Last active May 25, 2023 21:47 — forked from xavriley/auto_dubstep.rb
Auto generating dubstep with Sonic Pi
# DUBSTEP
# Combines ideas from my other gists
current_bpm = 140.0
use_bpm current_bpm
# WOBBLE BASS
define :wob do
use_synth :saw
lowcut = note(:E1) # ~ 40Hz
@nischalshrestha
nischalshrestha / 1.rb
Last active January 31, 2023 15:50
Sonic Pi: Making music with code!
##| You can play notes, chords, scales Oh my!
##| Midi notes
play 64
##| Or with more human-friendly note names :<letter><octave>
##| play :c2
##| play has attack, decay, sustain, release parameters to shape the sound
##| play :c, attack: 1, decay: 0.5, sustain: 2, release: 0.1
@nischalshrestha
nischalshrestha / THX_logo.rb
Last active December 13, 2022 06:03
Sonic Pi
##################
# THX logo sound #
##################
# THX revealed their sound logo here: https://twitter.com/THX/status/1000077588415447040/photo/1
# beginning random notes in the 200-400Hz
# you can play around with how many intervels you want in the
# 200 to 400hz range, I found 20 to be nice
@nischalshrestha
nischalshrestha / infinite_space.rb
Last active November 27, 2022 03:45
Sonic Pi tune
# Infinite Space
with_fx :reverb, room: 1, damp: 1 do
with_fx :tremolo, wave: 1, phase: 0.09 do
level = 3
with_fx :gverb, room: 300, damp: 1, ref_level: 0, release: level + 1 do
live_loop :guit do
with_fx :lpf, cutoff: 0 do
vol = 0.25
with_fx :flanger, feedback: 0, phase: 0.8, depth: 4 do
@nischalshrestha
nischalshrestha / conjuring.rb
Created May 31, 2021 06:11
Conjuring Sonic Pi
##| THE CONJURING sound...
live_loop :conjuring do
amp = 1
with_fx :reverb, room: 0.8, mix: 0.8 do
with_fx :lpf, cutoff: 0 do
with_fx :pitch_shift, pitch_dis: 0.002 do
with_synth :saw do
play :e1, amp: amp, attack: 0, sustain: 0.5, release: 1
play :e1, amp: amp, attack: 0.25, sustain: 0.5, release: 1
play :ds1, amp: amp, attack: 0.25, sustain: 0.5, release: 1