国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

AI作曲基礎(chǔ)-Python編程作曲軟件篇-FoxDot文檔及源碼分析-官方教程01

這篇具有很好參考價(jià)值的文章主要介紹了AI作曲基礎(chǔ)-Python編程作曲軟件篇-FoxDot文檔及源碼分析-官方教程01。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請(qǐng)大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問(wèn)。

AI作曲基礎(chǔ)-Python編程作曲軟件篇-FoxDot文檔及源碼分析-官方教程01

前言

  • 本系列系列目錄放在文尾;
  • 本系列是AI作曲的基礎(chǔ),暫時(shí)和AI關(guān)系不大,但尤為重要;
  • 借助FoxDot,從文檔分析開(kāi)始,然后進(jìn)入源碼分析環(huán)節(jié);
  • 暫未發(fā)現(xiàn)官方中文版,實(shí)踐順帶翻譯,會(huì)根據(jù)需要不定期校對(duì)及更新,歡迎催更~

正文

教程來(lái)源

FoxDot官方主頁(yè)在此:https://foxdot.org/
FoxDot官方教程在此:https://foxdot.org/tutorials/
注:上面網(wǎng)址內(nèi)的教程,在FoxDot軟件內(nèi)有~
AI作曲基礎(chǔ)-Python編程作曲軟件篇-FoxDot文檔及源碼分析-官方教程01

Tutorial 0: Introduction

# Tutorial 0: Introduction

################
# Executing code

# To execute code in FoxDot, make sure your text cursor is in the 'block' of code
# (sections of text not separated by blank lines) and press Ctrl+Return

# To execute just a single line, even in a block, press Alt+Return

# Try it now, move the cursor to the line of code below and press Ctrl+Return

print("Hello World")

##############
# Help

# If you're ever stuck, or want to know more about a function or class
# just type help followed by the name of that Python object in brackets:

help(object)

AI作曲基礎(chǔ)-Python編程作曲軟件篇-FoxDot文檔及源碼分析-官方教程01

Tutorial 1: Playing Notes

# Tutorial 1: Playing Notes

# In FoxDot, all two-character variable names are reserved for player objects, such as 'p1'
# Creating a Player Object with no arguments will play a single note on middle C, by default, repeatedly until stopped.
# Use >> to give one of these to a player object like so:

p1 >> pluck()

# To stop an individual player object, simply execute

p1.stop()

# Besides the 2-character variables that are pre-reserved, you can create your
# own with your own names

foo = Player()
foo >> pluck()

# The >> in Python is usually reserved for a type of operation, like + or -, but it is not the case in FoxDot.
# If a user re-executes the code, FoxDot will update p1 instead of creating a PlayerObject,
# which means you can make changes to your music using just one line of code.

# If you now give your player object some arguments, you can change the notes being played back.
# The first argument should be the degree of the note to be played
# (default is the lowest note of octave 5 of the major scale) and does not need to be specified by name.

# Python, like most programming languages, using zero-indexing when accessing values in an array,
# which means that 0 refers to the first note of the scale.
# Give your player object instructions to make music with their Synth.
# The first argument is the note of the scale to play. The following code
# plays the first three notes of the default scale (major) on repeat.

# For a single note
p1 >> pluck(0)

# Or a list of notes
p1 >> pluck([0,1,2])

# But you’ll need to specify whatever else you want to change...

# Such as note durations, or the length of each note
p1 >> pluck([0,0,0], dur=[1,2,3])

# Or amplitude, the "volume" of each note
p1 >> pluck([0,0,0], amp=[1,2,3])

# If the second list, the amp in this example, is too long, then the first list (the degree) just loops, and are matched with the remaining elements from the second list (the amplitude).
p1 >> pluck([0,2,4], amp=[1,2,3,1,5])

# More generally, all the lists are traversed regardless of their length.
p1 >> pluck([0,2,4], dur=[1,2], amp=[1,2,3,1,5])

# Arguments can be integers, floating points, fractions, lists,
# tuples, or a mix

p1 >> pluck([0,0,0], dur=2)

p1 >> pluck([0,0,0], dur=1.743)

p1 >> pluck([0,0,0], dur=[0.25,0.5,0.75])

p1 >> pluck([0,0,0], dur=[1/4,1/2,3/4])

p1 >> pluck([0,0,0], dur=[1/4,0.25,3])

# Lists of values are iterated over as the Player plays notes
# The following duration equates to:  1,2,3,1,4,3
# If you don't understand this yet, don't worry, more about patterns in the pattern tutorial
p1 >> pluck([0,0,0], dur=[1,[2,4],3])

# Values in tuples are used simultaneously i.e. p1 will play 3 individual notes, then a chord of 3 together at the same time.
p1 >> pluck([0,2,4,(0,2,4)])

# You can also assign values to the attributes of player objects directly
p1.oct = 5

# To see all the names of player attributes, just execute
print(Player.get_attributes())

# More about those later in the player attributes tutorial

# You could store several player instances and assign them at different times
proxy_1 = pads([0,1,2,3], dur=1/2)
proxy_2 = pads([4,5,6,7], dur=1)

p1 >> proxy_1 # Assign the first to p1

p1 >> proxy_2 # This replaces the instructions being followed by p1

# To play multiple sequences at once, just do the same things with another
# Player object:

p1 >> pluck([0, 2, 3, 4], dur=1/2)

p2 >> pads([(0, 2, 4), (3, 5, 7)], dur=8)

# Play only this player, muting others
p1.solo() # default value is 1 (solo on)

# And turn the solo off
p1.solo(0)

# Stop (not just mute) the other players
p1.only()

# Use Ctrl+. to clear everything for the scheduling clock or run
Clock.clear()

AI作曲基礎(chǔ)-Python編程作曲軟件篇-FoxDot文檔及源碼分析-官方教程01

系列目錄

AI作曲基礎(chǔ)-Python編程作曲軟件篇-FoxDot文檔及源碼分析-官方教程01【本文】
以下【建設(shè)中】
AI作曲基礎(chǔ)-Python編程作曲軟件篇-FoxDot文檔及源碼分析-官方教程02文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-500035.html

到了這里,關(guān)于AI作曲基礎(chǔ)-Python編程作曲軟件篇-FoxDot文檔及源碼分析-官方教程01的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來(lái)自互聯(lián)網(wǎng)用戶(hù)投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場(chǎng)。本站僅提供信息存儲(chǔ)空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請(qǐng)注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請(qǐng)點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • AI+軟件工程:10倍提效!用ChatGPT編寫(xiě)系統(tǒng)功能文檔

    AI+軟件工程:10倍提效!用ChatGPT編寫(xiě)系統(tǒng)功能文檔

    系統(tǒng)功能文檔是一種描述軟件系統(tǒng)功能和操作方式的文檔。它讓開(kāi)發(fā)團(tuán)隊(duì)、測(cè)試人員、項(xiàng)目管理者、客戶(hù)和最終用戶(hù)對(duì)系統(tǒng)行為有清晰、全面的了解。 通過(guò)ChatGPT,我們能讓編寫(xiě)系統(tǒng)功能文檔的效率提升10倍以上。 我們以線上商城系統(tǒng)為例,介紹如何使用ChatGPT幫我們完成系統(tǒng)

    2024年03月25日
    瀏覽(19)
  • 全面掌握軟件開(kāi)發(fā)與設(shè)計(jì):從文檔編寫(xiě)到AI繪畫(huà)與圖標(biāo)設(shè)計(jì)(大綱)

    引言 介紹軟件開(kāi)發(fā)與設(shè)計(jì)的多面性 強(qiáng)調(diào)文檔編寫(xiě)、AI繪畫(huà)、Markdown、GitHub和圖標(biāo)設(shè)計(jì)的重要性 在當(dāng)今快速發(fā)展的技術(shù)時(shí)代,軟件開(kāi)發(fā)與設(shè)計(jì)不僅是技術(shù)實(shí)現(xiàn)的過(guò)程,更是藝術(shù)與科學(xué)的結(jié)合。從項(xiàng)目文檔的編寫(xiě)到AI繪畫(huà)的創(chuàng)新應(yīng)用,再到UI界面中圖標(biāo)設(shè)計(jì)的精妙,每一個(gè)環(huán)節(jié)都

    2024年04月15日
    瀏覽(36)
  • AI創(chuàng)作系統(tǒng)ChatGPT網(wǎng)站源碼+搭建部署教程文檔,AI繪畫(huà),支持TSS GPT語(yǔ)音對(duì)話功能

    AI創(chuàng)作系統(tǒng)ChatGPT網(wǎng)站源碼+搭建部署教程文檔,AI繪畫(huà),支持TSS GPT語(yǔ)音對(duì)話功能

    SparkAi創(chuàng)作系統(tǒng)是基于ChatGPT進(jìn)行開(kāi)發(fā)的Ai智能問(wèn)答系統(tǒng)和Midjourney繪畫(huà)系統(tǒng),支持OpenAI-GPT全模型+國(guó)內(nèi)AI全模型。本期針對(duì)源碼系統(tǒng)整體測(cè)試下來(lái)非常完美,可以說(shuō)SparkAi是目前國(guó)內(nèi)一款的ChatGPT對(duì)接OpenAI軟件系統(tǒng)。那么如何搭建部署AI創(chuàng)作ChatGPT?小編這里寫(xiě)一個(gè)詳細(xì)圖文教程吧!

    2024年02月04日
    瀏覽(709)
  • AiDD AI+軟件研發(fā)數(shù)字峰會(huì)開(kāi)啟編程新紀(jì)元

    AiDD AI+軟件研發(fā)數(shù)字峰會(huì)開(kāi)啟編程新紀(jì)元

    隨著OpenAI 推出全新的對(duì)話式通用人工智能工具——ChatGPT火爆出圈后,人工智能再次受到了工業(yè)界、學(xué)術(shù)界的廣泛關(guān)注,并被認(rèn)為向通用人工智能邁出了堅(jiān)實(shí)的一步,在眾多行業(yè)、領(lǐng)域有著廣泛的應(yīng)用潛力,甚至?xí)嵏埠芏囝I(lǐng)域和行業(yè),特別是軟件研發(fā)領(lǐng)域,因此它必然會(huì)引

    2023年04月14日
    瀏覽(22)
  • 手機(jī)版python編程軟件下載,手機(jī)python編程軟件

    手機(jī)版python編程軟件下載,手機(jī)python編程軟件

    軟件介紹: python是一款面向?qū)ο?、解釋型、?dòng)態(tài)數(shù)據(jù)類(lèi)型的高級(jí)編程設(shè)計(jì)語(yǔ)言。它擁有語(yǔ)言上的簡(jiǎn)潔性、可讀性和易維護(hù)性,在圖形處理、數(shù)學(xué)處理、文本處理、系統(tǒng)編程、數(shù)據(jù)庫(kù)編程等領(lǐng)域都被廣泛應(yīng)用。 所需工具: 安裝教程 1、下載好安裝包,雙擊運(yùn)行“python-3.6.2-amd

    2024年02月09日
    瀏覽(23)
  • python手機(jī)編程軟件 蘋(píng)果,用手機(jī)編程python的軟件

    python手機(jī)編程軟件 蘋(píng)果,用手機(jī)編程python的軟件

    這篇文章主要介紹了python手機(jī)編程軟件下載官方,具有一定借鑒價(jià)值,需要的朋友可以參考下。希望大家閱讀完這篇文章后大有收獲,下面讓小編帶著大家一起了解一下。 Source code download: 本文相關(guān)源碼 安裝完成后,打開(kāi)這個(gè)軟件,就可以直接編寫(xiě)C/C++代碼了,如下,代碼高

    2024年03月11日
    瀏覽(25)
  • 手機(jī)python編程軟件哪個(gè)好,手機(jī)python編程軟件app

    手機(jī)python編程軟件哪個(gè)好,手機(jī)python編程軟件app

    大家好,小編來(lái)為大家解答以下問(wèn)題,手機(jī)python編程軟件哪個(gè)好,手機(jī)版python編程軟件下載,現(xiàn)在讓我們一起來(lái)看看吧! ? 軟件介紹: python是一款面向?qū)ο?、解釋型、?dòng)態(tài)數(shù)據(jù)類(lèi)型的高級(jí)編程設(shè)計(jì)語(yǔ)言。它擁有語(yǔ)言上的簡(jiǎn)潔性、可讀性和易維護(hù)性,在圖形處理、數(shù)學(xué)處理、

    2024年01月25日
    瀏覽(21)
  • 手機(jī)python編程軟件怎么用,手機(jī)python編程軟件下載

    手機(jī)python編程軟件怎么用,手機(jī)python編程軟件下載

    大家好,小編來(lái)為大家解答以下問(wèn)題,手機(jī)python編程軟件保存的代碼在哪里,手機(jī)python編程軟件怎么運(yùn)行,現(xiàn)在讓我們一起來(lái)看看吧! ? 原標(biāo)題:盤(pán)點(diǎn)幾個(gè)在手機(jī)上可以用來(lái)學(xué)習(xí)編程的軟件 前天在悟空問(wèn)答的時(shí)候,很榮幸被邀請(qǐng)參加回答“在手機(jī)上可以用來(lái)學(xué)習(xí)編程的軟件

    2024年02月14日
    瀏覽(26)
  • python編程手機(jī)軟件哪個(gè)好,用手機(jī)編程python的軟件

    python編程手機(jī)軟件哪個(gè)好,用手機(jī)編程python的軟件

    大家好,本文將圍繞python編程手機(jī)軟件哪個(gè)好展開(kāi)說(shuō)明,用手機(jī)編程python的軟件是一個(gè)很多人都想弄明白的事情,想搞清楚python手機(jī)編程軟件下載需要先了解以下幾個(gè)事情。 常用的python庫(kù)有哪些 10個(gè)頂級(jí)且實(shí)用的python庫(kù)1、DashDash是比較新的軟件包,它是用純python構(gòu)建數(shù)據(jù)可視

    2024年01月25日
    瀏覽(18)
  • [bat]0基礎(chǔ)實(shí)現(xiàn)自動(dòng)化辦公-基于start實(shí)現(xiàn)一鍵打開(kāi)常用軟件/文檔

    [bat]0基礎(chǔ)實(shí)現(xiàn)自動(dòng)化辦公-基于start實(shí)現(xiàn)一鍵打開(kāi)常用軟件/文檔

    每次開(kāi)機(jī)時(shí),都要一個(gè)個(gè)打開(kāi)常用軟件,比如微信、QQ或是word文檔、excel表格等程序,比較費(fèi)時(shí)。 使用bat腳本中的start方法,通過(guò)將需要打開(kāi)的程序或文件寫(xiě)入到bat腳本中,運(yùn)行bat腳本從而實(shí)現(xiàn)一鍵批量打開(kāi)常用軟件。 通過(guò)前文已實(shí)現(xiàn)了新建一個(gè)可運(yùn)行的bat腳本,現(xiàn)在我們只

    2024年01月19日
    瀏覽(21)

覺(jué)得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請(qǐng)作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包