九哥在这里祝大家:Happy 🐮 Year ~
演奏这个曲子,用到winsound库,有兴趣的小伙伴可以自己测试,这里仅供娱乐哈~
附上代码:
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
clr.AddReference("RevitAPIUI")
from Autodesk.Revit.UI import *
from System.Threading import Thread
import winsound
#1 1 1 5
Thread.Sleep(100)
winsound.Beep(352, 250)
Thread.Sleep(125)
winsound.Beep(352, 250)
Thread.Sleep(125)
winsound.Beep(352, 500)
Thread.Sleep(125)
winsound.Beep(264, 900)
Thread.Sleep(150)
#3 3 3 1
winsound.Beep(440, 250)
Thread.Sleep(125)
winsound.Beep(440, 250)
Thread.Sleep(125)
winsound.Beep(440, 500)
Thread.Sleep(125)
winsound.Beep(352, 900)
Thread.Sleep(150)
# 1 3 5 5 4 3 2
winsound.Beep(352, 125)
Thread.Sleep(125)
winsound.Beep(440, 250)
Thread.Sleep(125)
winsound.Beep(523, 500)
Thread.Sleep(125)
winsound.Beep(523, 500)
Thread.Sleep(125)
winsound.Beep(466, 200)
Thread.Sleep(125)
winsound.Beep(440, 250)
Thread.Sleep(125)
winsound.Beep(396, 1000)
Thread.Sleep(150)
#2 3 4 4
winsound.Beep(396, 125)
Thread.Sleep(125)
winsound.Beep(440, 300)
Thread.Sleep(125)
winsound.Beep(466, 500)
Thread.Sleep(125)
winsound.Beep(466, 500)
Thread.Sleep(150)
#3 2 3 1
winsound.Beep(440, 125)
Thread.Sleep(250)
winsound.Beep(396, 200)
Thread.Sleep(250)
winsound.Beep(440, 600)
Thread.Sleep(125)
winsound.Beep(352, 700)
Thread.Sleep(150)
#1 3 2 5 7 2 4
winsound.Beep(352, 125)
Thread.Sleep(125)
winsound.Beep(440, 250)
Thread.Sleep(125)
winsound.Beep(396, 500)
Thread.Sleep(125)
winsound.Beep(264, 550)
Thread.Sleep(125)
winsound.Beep(330, 150)
Thread.Sleep(125)
winsound.Beep(396, 250)
Thread.Sleep(125)
winsound.Beep(352, 950)
OUT = TaskDialog.Show("喜迎牛年🐮快乐成长!", "九哥祝大家:Happy 🐮 Year ~")
好了,马上过年了,再次祝小伙伴们新年快乐~我们来年再战!
本公众号还有其他Dynamo案例教程:
联系客服