Skip to content

Instantly share code, notes, and snippets.

t = Time.now.to_i
use_random_seed t
kick_sleep_time = sample_duration(:loop_breakbeat, rate: 0.7)
puts kick_sleep_time
live_loop :hiss_loop do
sample :vinyl_hiss, amp: 2
sleep sample_duration :vinyl_hiss
end
use_bpm 160
pattern = [
:Ds3, :E3, :Gs3, :B3, :Ds4, :Fs4
].ring
pattern2 = [
:Gs2, :E3, :Gs3, :B3, :Ds4, :Gs4
].ring

Tiger's meal

How've you been?
I'm old bones, trapped beneath a circus cage,
letovers from a tiger's meal.
Hallelujah, amen.
Days go by, like cartwheels
Sun shine's bright, but hail's falling down from the sky..
When you go back to sleep
you can get off on dreams

@mogimogitomato
mogimogitomato / rose.rb
Last active December 19, 2021 04:18
#ruby
use_bpm 112
NOTE_TIME = 0.25
live_loop :kick do
loop do
sample :bd_haus, rate: 0.5
sleep NOTE_TIME * 4
end
end

Flutter  

特徴

  • UI Tool kit
  • natively compiled application
  • →cordovaと違ってnativeで動く。react nativeなんかと同じ

メリット

  • Android, iOS, Web作れる
  • Material Design準拠のComponentが揃ってる
private void testIsWifiConnect() {
ConnectivityManager manager = (ConnectivityManager)
getApplicationContext().getSystemService(Context.CONNECTIVITY_SERVICE);
if (manager != null) {
Network network = manager.getActiveNetwork();
if (network != null) {
NetworkCapabilities capabilities = manager.getNetworkCapabilities(network);
if (capabilities.hasTransport(NetworkCapabilities.TRANSPORT_WIFI)) {
Toast toast = Toast.makeText(getApplicationContext(), "WiFi Connect", LENGTH_LONG);
toast.show();
use_bpm 120
live_loop :guitar do
with_fx :pan, pan: 0.6 do
with_fx :slicer, seed: 345, _slide: 2.0 do
with_fx :echo, amp: 1.0, phase: 1.0, mix: 0.5 do
sample :guit_harmonics, rate: -3.0
end
end
end
@mogimogitomato
mogimogitomato / supercollider_rhodes
Last active April 11, 2018 18:53 — forked from mbutz/supercollider_rhodes
Rudimentary Fender Rhodes Synth Definition for Sonic Pi with SuperCollider
// Thanks to snappizz, http://sccode.org/1-522 thanks to hint and help by Alexandre Enkerli
// At least you can specify frequency as a midi note
(
SynthDef(\rhodes, {
|
// standard meanings
out_bus = 0, note = 60, amp = 1, out = 0, gate = 1, pan = 0,
// all of these range from 0 to 1
vel = 0.8, modIndex = 0.2, mix = 0.2, lfoSpeed = 0.4, lfoDepth = 0.1
# spartacus_loop
## 実行時は、Sonic Piを立ち上げて
## Prefs⇛Studio⇛Enable external synths and FXにチェックを入れる必要があります。
## Synth定義を読み込む(作成したSynthDefの格納されてるフォルダの場所を指定)
load_synthdefs "your_own_path"
## intro counter
@@num = 0

vim 覚え書き

範囲選択系

  • 複数行削除:
削除範囲の開始行で「ms」
削除範囲の終了行で「me」
「:'s,'ed」を入力しEnter

or