Skip to content

Instantly share code, notes, and snippets.

@peio
Last active January 19, 2021 09:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peio/ca6ab11c8318edd27f1a3d0defe47cac to your computer and use it in GitHub Desktop.
Save peio/ca6ab11c8318edd27f1a3d0defe47cac to your computer and use it in GitHub Desktop.
# Sexy Vibe viz from: http://ohyespodcast.com/2021/01/partner-multifun-3/
# Run in Notebook
import matplotlib.pyplot as plt
%matplotlib inline
sequences = [
'11111122222333200011112222233332000',
'33332211110111112223333',
'22223344321012223344332101',
'4444433332211011223333444',
'33!-33!-33!-33!-33!-33!-33!'
]
plt.figure( figsize=(16,10) ) # 26,20
plt.title("Sexy Vibes")
plt.xlabel("Time")
plt.ylabel("Intensity")
plt.grid()
for sequence in sequences:
sequence = list(sequence)
for vibe in range(len(sequence)):
try:
sequence[vibe] = int(sequence[vibe])
except:
pass
if sequence[vibe] in [0,1,2,3,4]:
sequence[vibe] += 1
elif sequence[vibe] == '-':
sequence[vibe] = 0
elif sequence[vibe] == '!':
sequence[vibe] = int(sequence[vibe-1])+0.5
else:
print 'issue:',sequence[vibe]
continue
print sequence
time = range(len(sequence))
plt.plot(time, sequence)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment